UIView
and its subclasses all have the properties frame
and bounds
. What\'s the difference?
All answers above are correct and this is my take on this:
To differentiate between frame and bounds CONCEPTS developer should read:
- relative to the superview (one parent view) it is contained within = FRAME
- relative to its own coordinate system, determines its subview location = BOUNDS
"bounds" is confusing because it gives the impression that the coordinates are the position of the view for which it is set. But these are in relations and adjusted according to the frame constants.