Can an Apple Watch app have multiple glances?

314 views Asked by At

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:

enter image description here

Bottom part:

enter image description here

2

There are 2 answers

5
sudhanshu-shishodia On BEST ANSWER

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.

0
Quentin Hayot On

The answer is as simple as:

No.


  • I'm not sure about changing it programmatically (haven't tried)
  • I don't think that you can load different glances.

The point of glances is to allow users to find one piece of info ultra quickly. For that, they need to know what they will be looking at. That's why there is only one glance per app.