Chapter 4Organizing Your UI with Groups
The UI system in WatchKit is entirely linear. As you’ve seen thus far, when you add interface objects to an interface controller, they stack from top to bottom. Instead of using Auto Layout to position user interface objects with constraints, or the old “springs and struts” style of autoresizing masks that came before it, WatchKit handles positioning interface objects on your behalf. You probably noticed this behavior when you were adding interface objects to your storyboard.
This system of automatically positioning elements in a sequence is much more like the new UIStackView class in iOS than the other, older iOS layout paradigms. Introduced in iOS 9, UIStackView class is a container for other UIView ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access