O'Reilly logo

Learn WatchKit for iOS by Kim Topley

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

Building and Maintaining the Table

All the code in the interface controller is concerned with constructing the table based on the content of the DisplayedCityInfoModel and the WatchKit extension’s copy of the weather model and keeping it up to date with changes in either of those models. Here’s the overall plan:

  • We’ll build the initial set of table rows when the controller’s awakeWithContext() method is called. Because the extension may not have been active for some time (or at all, if this is the first time the user has started the WatchKit app), some or all of the weather data that is available may not be current, so we’ll request updated data if necessary.
  • When the interface controller is activated, we’ll check whether the table is still ...

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