All UIViews have frame and bounds properties which define their dimensions. The similarity of these properties can cause some confusion when attempting to determine which property to use to calculate view sizes or reposition views.
The frame of a view is given in the coordinates of its superview so a view controller’s view’s frame will include offsets for the status bar, navigation bar, or tab bar. The bounds of a view are given in the view’s own coordinate system which does not include these elements.
In addition the frame property’s values are undefined if the view has any transform other than the identity transform. Rotating a view into landscape mode applies a transform to the view so it is not safe to rely on frame values for an app in landscape mode.
When a transform is applied to a view it does not apply to any subviews. A UIViewController or custom UIView subclass is therefore free to adjust the frames of its subviews to reposition them regardless of the device’s orientation. For example a UIView class can change the frames of its subviews within its layoutSubviews method no matter what transform might have been applied to the parent view.
Each view’s frame will position it relative to its parent view so an origin of (0, 0) will always place a subview in the top left corner of its parent view.
See the images below for examples