Chapter 2
Interface Controllers and Layout
Chapter 1 introduced the basic building blocks of WatchKit and helped you create a very simple application. This chapter looks in detail at interface controllers, the WatchKit equivalent of UIKit’s view controllers. We start by discussing the lifecycle of an interface controller and how it relates to the lifecycle of your WatchKit application’s extension. We then cover in some detail the way in which interface controllers handle layout and the storyboard tools you can use to construct layouts that adapt to the different screens of the 38mm and 42mm Apple Watch devices.
Interface Controllers
As you saw in Chapter 1, interface controllers contain the logic for your WatchKit application. Every interface ...
Get Learn WatchKit for iOS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.