Adding User Interface Elements
If you select the watch app target’s scheme in Xcode (by clicking HelloWatch in the toolbar and selecting HelloWatch WatchKit App, or selecting Product → Scheme → HelloWatch WatchKit App) and then you build and run (by pressing ⌘R), you’ll be greeted with a mostly blank Apple Watch screen with the time in the upper-right corner and nothing else. Congratulations: your first watch app is up and running! Now, let’s make it do something. You’ll add a button and a label to this screen; tapping the button will change the title of the label. Head to the watch app’s storyboard file in Xcode. If you don’t see it, open the Project Navigator by pressing ⌘1 and expanding the HelloWatch WatchKit App group; it’s named Interface.storyboard ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access