The meaning and function of frame.origin.x?

Source: Internet
Author: User

The meaning and function of frame.origin.x?
Scrollview.frame
A view frame contains the length and width of its rectangle shape (size).
and its coordinate origin (origin) x and Y coordinates in the parent view
Frame frame
Origin is what it is called the starting point
Frame is not a specific object in iOS, he is just a property of some controls.
The value of frame is a cgrect including (Originx,originy,width,height).
Originx and Originy correspond to the object's coordinates in its superview, which means that he is a relative coordinate.
The frame of view is the location and size of the view in its Super view.
What is the difference between bounds and frame in UIView?
What is the absolute coordinate value, the relative coordinate value?
The absolute coordinates are: x, Y is relative to the origin of the coordinates.
Bounds refers to the coordinates and size of this view in its own coordinate system, and frame refers to the coordinates and size of the view in its Superview coordinate system,
The difference is mainly in the coordinate system of this piece.
Frame is the relative coordinate. Bounds is the absolute coordinate.
Obviously, the origin of the bounds is the (0,0) point, and the frame's origin is arbitrary.
Frame if a button is in the table, the coordinates of the button frame are relative, not relative to the screen, that is, relative coordinates, not absolute coordinates.
It is obvious that one is the coordinate system of the origin, and one is the coordinate system with the screen as the Origin point.

The meaning and function of frame.origin.x?

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.