At present, most of the routine activities in the app or the pages that need to be changed frequently will be presented in the form of embedded H5, allowing the front-end to complete the development; Make pages so easy; However, the damping rebound effect of pull-down and pull-up on ios makes the page experience very poor; One is the black background that leaks out of the bottom; The second is the local scrolling in the web page and ios system scrolling mix, resulting in local and page scrolling together, the experience is poor;
At this point, the product manager project manager said, you have to solve this !!!!
Well, roll up your sleeves and get to work;
A screen page
In the first form, the page has only one screen and does not overflow. So fixed position + scroll; Boy, a CSS bug that I successfully triggered became a pot lid that I couldn’t get out of my head at the company (reasons to be continued…).
Specifically, after fixed positioning of the entire page, when the list and other parts need to overflow scrolling, set overflow-y: auto; On ios, when you swipe up and down quickly, the whole scroll gets stuck. This phenomenon can be explained in the CSS.
More screen page
Involving long background, we can not say that the above form; But there will be a bottom leak, or partial scrolling and page scrolling mixed; At this time, I tried to monitor touchMove, inside the list, put the whole page overflow: Hidden away, scroll outside the list, release the page;
Obvious shortcomings, poor performance, abnormal operation page is not released in time or fast operation, resulting in as if the phenomenon of stuck; So it is still abandoned;
Finally, he could only report angrily to the head and said that he had not found a better plan
The ios developers show up
One line of code
wkwebview.scrollview.bounces = NO
Copy the code
Then he said, none of you are looking for me; Early say ah, I ……………………
In retrospect, whether it’s product manager, project manager, technical director, they used to say to me, let me solve the front end… The head of front-end technology, also said, you figure it out…
This kind of other people a line of code to solve the matter ah, today solved, this feeling, very sour cool &~*…… @?