Frame: Refers to the size and position of the view in the coordinate system of the parent view.
Bound: Refers to the size of the view in the coordinate system of the attempt itself (the origin of the position is the original point). Center: Refers to the point at which the view is centered in the parent view coordinate system. A picture of the Apple website: frame and bound relationshipHere is one of the changes , the remaining two changes, see directly, very superficial.
Although you can change the frame , bounds , and center Properties independent of the others, changes to one property affect T He others in the following ways:
-
When you set the frame property, the size of value in the bounds property changes to match the new size of the frame rectangle. The value in the Center property similarly changes to match the new center point of the frame recta Ngle.
-
When you set the Center property, the origin value in the frame Changes accordingly.
-
When you set the size of the bounds property, the size value in the frame property changes to match the new size of the bounds rectangle.
By default, a view's frame is not clipped to its superview ' s frame. Thus, any subviews that lie outside of their superview ' s frame is rendered in their entirety. You can change this behavior, though, by setting the Superview ' s clipstobounds property to < Code>yes . Regardless of whether or not subviews is clipped visually, touch events always respect the bounds rectangle of the target View ' s Superview. In other words, touch events occurring in a part of a view the lies outside of its Superview ' s bounds rectangle is not D Elivered to that view.