This is a private Apple class, which is used for topLayoutGuide
and bottomLayoutGuide
when auto layout is enabled. If your navigation bar is opaque, one of these "views" will be in [0,0]. If your navigation bars are translucent, same view
will usually be in [0,64] in portrait (20pt for the status bar + 44pt for the navigation bar). There is an analogous one for the bottom toolbar, if you have one.
The reason it is done this way is so you could define layout constraints, which work with UIView
objects.
One thing to notice, if you have some logic which works on subviews, be careful not to include them in your calculations. You can ignore these by testing:
[subview conformsToProtocol:@protocol(UILayoutSupport)]
On iOS 9, there is a new private class, _UILayoutSpacer
, which is not a descendant of UIView
, but can be used to set up constraints. The system seems to work in a dual mode, where controllers loaded from xibs and storyboard still use _UILayoutGuide
, while controllers created in code are set up using _UILayoutSpacer
.