I saw a watchface that could display a preview of the watchface in the background while settings were being changed in the on-watch settings menu. How is this done?
I saw a watchface that could display a preview of the watchface in the background while settings were being changed in the on-watch settings menu. How is this done?
I can see such behaviour in stock watch faces but they are not written in CIQ.
I haven't tested it but probably you can't use view that draws entire screen. Try to use view with empty onUpdate.
I‘m guessing they implemented their own special view which draws the watchface and a menu that partially overlays the watchface (off to the side, like an action menu?).
This would be possible because you can return any kind of view (*) from getSettingsView(), and that view can push any kind of view it wants as well.
It’s also possible they used a CIQ action menu, which would be simpler. But that assumes that they didn’t need dynamic menu labels and that the view “underneath” the action menu is still updated while the action menu is visible (I hope so but I haven’t tried it.)
(* The only exception I‘ve found is that settings views will never update without user input, even if you call WatchUi.requestUpdate(), which means that you can’t abuse watchface/datafield on-device settings to display stats or any other data changes without user intervention. For example if you push a MapView, it won’t update by itself, only when a button is pressed.)
I had similar problem with my app (not WF) Wanted to display 2 "layers", one is a game board, and above it a keyboard. As they "type" letters I wanted to display it on the board immediately. The way I managed to do it was to unite the 2 views. You can probably reuse your existing onUpdate code by calling it from the settings view's onUpdate. As you pass DC it'll draw on the settings view's canvas. When it returns then you continue to draw the settings menu over it
Thanks. I looked at CIQ action menu items. It is a candidate for what I want to do as well. But I just couldn't figure out how to use it after tinkering with it for a while.