O'Reilly logo

Developing for Apple Watch by Jeff Kelley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required