Clipstobounds Property Description:
Value: BOOL (yes/no)
Role: Determines the display scope of the child view. Specifically, when the value is yes, it trims the portion of the child view that is outside the parent view range, and when the value is no, the child view is not trimmed (the out section continues to display, for example, in ScrollView ...). )。 The default value is No.
view Add view, and Shear Edge (UIView Property clipstobounds application) title, there are two view:view1,view2
View1 add View2 to it, if VIEW2 is greater than view1, or View2 's coordinates are not within the View1 range, View2 is covered with view1, meaning that the excess will be drawn.
UIView has a property, clipstobounds by default is no,
If we want view2 to hide the excess, we have to change its parent view and view1 the Clipstobounds attribute value.
View1.clipstobounds = YES;