The bounce attribute of scrollview in ios and clipsTobounds attribute in view, clipstobounds
I. bounce attribute of scrollview
When scrollview scrolls to the boundary, it will have a bounce effect. The bounce attribute exists in scrollview. If it is set to yes, it will rebound. If it is set to NO, it will not rebound. Could you tell me, can we make it rebound with only one boundary? This function can be used to achieve continuous sliding by adding tableview and scrollview to a scrollview, that is, when the table slides to the end, the scrollview under the scrollview slides.
Ii. clipsTobounds attribute in view
Iew2 adds view1 to. If view2 is greater than view1, or view2 is not in the range of view1, view2 is covered by view1, which means that the excess part will be drawn.
UIView has an attribute. clipsTobounds is NO by default.
If we want view2 to hide the excess part, we have to change its parent View to the clipsTobounds attribute value of view1.
View1.clipsTobounds = YES;
It can effectively solve the coverage problem.