Considering Table Input

If you look at the documentation for WKInterfaceTable, you may notice that there is no delegate property, nor (seemingly) any way to handle when the user taps our table. Is this some massive oversight of WatchKit’s? Do we need to search for a cryptic informal protocol in Objective-C? Turns out the answer is neither of those things. When the user interacts with a WKInterfaceTable, those interactions are automatically forwarded to the table’s containing interface controller, much like the responder chain on iOS. Specifically, we want to look at WKInterfaceController’s table(_:didSelectRowAtIndex:) method.

In our table, we’ll probably want to show the details for a run when the user taps a row. We’ll cover displaying another ...

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.