Use of IOS clipstobounds properties

Source: Internet
Author: User
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;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.