O'Reilly logo

Swift Essentials - Second Edition by Dr. Alex Blewitt

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

Creating watch interfaces

A watch's user interface is built up of elements in a similar way to iOS applications, except that the user toolkit is built using WatchKit instead of UIKit. In the same way that classes, such as UITableView, exist, corresponding classes, such as WKInterfaceTable, also exist. There are minor differences; for example, the UITableView will dynamically populate the elements upon display, but the WKInterfaceTable will expect to be told in advance how many rows exist and what these rows are.

Adding a list of users to the watch

Unlike the UITableView, which provides section headers to group rows, a WKInterfaceTable only permits a single list of items. Instead, the application will be designed so that the first screen will show ...

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