Stephen Anthony
1 min readJan 2, 2018

--

Not quite. You use UILayoutGuide to create a rectangle within a view that subviews can then be anchored to. In the example I used UIView’s layoutMarginsGuide as this is one that is provided by Apple, but there’s nothing to stop you creating your own to make it easy to group together and layout a set of subviews (as in Apple’s example here). These layout guides expose layout anchors just like UIView does, which you use to create layout constraints between subviews and the layout guide.

--

--

Stephen Anthony
Stephen Anthony

Written by Stephen Anthony

iOS Developer. I write @DarjeelingApps. Formerly: Senior iOS Developer at MobileIQ; Developer at Morgan Stanley.

No responses yet