The question is as simple as:
Can an Apple Watch app have multiple glances?
I tried to put multiple glances in the Xcode storyboard but Xcode said that only one Glance is allowed for each app.
Reason I am asking this is that I would like to change the layout of the Glance based on the information I display.
But the question could also be phrased as:
Is it possible to
- change the glance layout programmatically or
- load different glances depending on the context.
Is any of the two possible? And if not, is there any indication that this may change after WWDC 2015?
EDIT:
To clarify. I agree, multiple glances seem not to be available, however changing layout of a glance may be (I personally think that they will allow developers to do so soon but as far we are concerned at the moment the only way I can change a glance layout is to choose it from the list provided in XCode).
Currently these are the layouts available for glances (top and bottom part). Ideally I'd like to choose them programmatically. If anyone knows how then please share some code snippet/sample:
Top part:
Bottom part:
An app can have 1 glance associated with it. However it can be modified from time to time as per your requirement.
awakeWithContext()
is called once for the controller. You can do general init work there.willActivate()
will be called everytime the glance controller is about to be initialised and you can request new data, change view there, do other awesome work, etc.So to answer your question, you can load different glances depending on the context. But an app can have only ONE glance at a time.
Hope this helped.