Adding a Glance

As you learned earlier,, each watch app can have one Glance to display information to the user right from the watch face. To add one to HelloWatch, open the project in Xcode and open its Interface.storyboard file. In the Object Library in the lower right (available by pressing ⌃⌥⌘3), find the Glance Interface Controller object, and drag it onto the canvas. You’ll notice it’s full of interface objects, roughly organized into sections. We will discuss these sections, called groups, more later in their own chapter, but it’s important to note that there are two sections to the Glance, upper and lower.

The Glance interface controller is pretty unique in that you can’t directly control its child objects. Try to delete ...

Get Developing for Apple Watch, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.