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

Configuring the Content in Tables

Now that we’ve squared away how our row controller is going to behave, we can use it in our RunLogInterfaceController. Unlike UITableView from UIKit, where we’d return the number of rows from a data source method and then configure each row on demand, we’ll set the number of rows manually, then iterate through them and configure them as we go. We’ll also configure our NSFormatter subclasses to do formatting, then pass them to each row controller. We’ll get everything set up in the interface controller’s willActivate method. First, however, we need the data to put in the rows. Create a new class in Swift. Add a new Swift file to our WatchKit extension, and name it Run.swift. In it, create a new class with some ...

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