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

Responding to user interaction

Typically, a watch user interface will present information to the user or let them select or manipulate it in some way. When items are presented in a table, then it is natural to let the user tap on the row to show a subsequent screen. Watch applications use segues to move from one screen to another in a similar way to iOS applications.

The first step will involve creating a new controller file called RepositoryListController.swift. This will be used to hold the RepositoryListController and RepositoryRowController classes, in a very similar way to the existing InterfaceController. As with the other view, there will be a table to store the rows, and each row will have a name label:

class RepositoryRowController: NSObject ...

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