Meet the Interface Objects

If this were a book on iOS in general and this chapter were the chapter on UIView, it would be insane to begin with a list of all of the UIView subclasses. Lucky for us, this is a book on WatchKit, and there are only 11 subclasses of WKInterfaceObject to deal with. Expect this number to grow as WatchKit matures, much like the iPhone SDK matured as it became the iOS SDK. I’ll divide the interface objects into three categories: objects that display data; objects that receive user input; and objects used for layout. Let’s meet our interface objects!

Objects That Display Data

We’ve already seen one of these interface objects: WKInterfaceLabel, which we used to display “Hello, Watch!” to our users. Labels act much like ...

Get Developing for Apple Watch 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.