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

Row Types and Storyboard Groups

Every WKInterfaceTable delivers content to the user in vertically stacked rows. To demonstrate this, let’s create a new interface controller in our running app. Once the user is finished with a run, she’ll want to be able to quickly scroll through a history of her runs, comparing distances and paces as she goes. To that end, let’s make an interface controller with a table in it that displays one row for each run, with the newest at the top.

First, open your watch app’s storyboard and drag in a new interface controller. Give it the title Run Log. Next, create a new WKInterfaceController subclass and name it RunLogInterfaceController, being sure to add it to your WatchKit extension and not your iPhone app. We’ll ...

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