Chapter 6Delivering Dynamic Content with Tables

Every piece of user interface we’ve seen so far in WatchKit has something in common: it’s static. We create the watch app’s UI in Interface Builder, set it up just so, and then use it in the app. Sure, we can get clever and hide some portions of the UI in some circumstances, but there’s one thing we haven’t yet seen: creating dynamic user interfaces that respond to users’ data. In our iPhone app, we can create these interfaces manually, perhaps placed inside a UIScrollView if there’s more than a screenful of content, but it’s much more common—and easier—to use either UITableView or UICollectionView. WatchKit targets much smaller screen sizes than UIKit, so it offers us WKInterfaceTable, a simpler, ...

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.