Linking Content to the UI with Row Controllers

If you look at the interface object hierarchy in your storyboard’s Run Log interface controller (if you don’t see it, select Editor Show Document Outline), you’ll see your labels are nested inside a parent group, but that instead of the group being a child of the table (which would match how it appears in the interface editor), there’s an intermediate object that looks different, called Table Row Controller. This is the row controller we’ve been talking about, and it’s vital to understanding how tables work in WatchKit.

Row controllers are lightweight objects that sit between tables and row content. Their entire role is to ferry data from your interface controller to the interface objects you’ve ...

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.