Meet WKInterfaceObject

When you’re making user interfaces for 38mm and 42mm screen sizes, every user interface element on the screen must be carefully considered. Not only can fewer elements fit on the screen than on iOS, but due to the smaller size, the user’s finger will necessarily obscure more of the screen while interacting with it. These truths impact the design of every element, as well as the overall design of watchOS apps in general.

From a code standpoint, there’s a huge difference between UIView and WKInterfaceObject: you cannot subclass WKInterfaceObject to create your own user interface objects. Instead of implementing custom rendering and touch handling, watchOS apps compose the built-in interface objects and achieve their desired ...

Get Developing for Apple Watch, 2nd Edition 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.