The difference between frame and bounds in iOS development

Source: Internet
Author: User

Gossip does not say much, first two pictures, the guys have already understood:

The effect shown is such a drop:


To clarify the difference between the two, the main point is to understand a few concepts: frame can be understood as a visual range, and bounds can be understood as the content location within the visual range. By default, the frame and bounds origin, that is, the x and Y axes are coincident. The frame and bounds in the parent view, the frame and the bounds in the child view, as I understand it, to determine the position of the child view two conditions, that is, the parent view of bounds and the frame in the child view , and the frame of the bounds and child views in the child view determines the size of the child view's position. That is, frame is the position and size of the coordinate system in the parent view, and bounds is relative to the position and size of the view coordinate system.

Note: Center is the location of the view's central point relative to the parent view.

The difference between frame and bounds in iOS development

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: 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.