Introduction to AppleWatch Development Six--glance (preview) Extension appFirst, Introduction
Glance is a preview extension similar to iOS's Today plugin in watchOS. The Watchapp that provides the glance function can arouse the glance on the Watch homepage, display the app related information, however this extension can only serve as the display function, and cannot carry on too much interaction, the interface layout also has the very big limit, therefore, the glance application mainly is displays the memo information and so on. Features are as follows:
1, extended style layout We are not completely personalized, only through the system template to layout.
2, the extension can not add interactive function, can only display information, click between the interface to evoke Watchapp.
3, an app can only enjoy a glance interface, and is single non-sliding.
Second, create a glance
When we create the Watchapp, we can tick create glance:
Similarly, if this is not checked, we can also pull a glance interface in storyboard:
It can be found that in this layout style, we cannot make modifications, only using some of the system-provided templates:
We create a template that associates the elements with the file, making the code dynamically set.
In Xcode7, select the Glance project in the Scream to run:
The simulator effect is as follows:
Introduction to AppleWatch Development Six--glance (preview) Extension app