how to set an identifier for a "next page" segue

This is bizarre (to me at least) but I can't set an identifier for a "next page" segue in the IB storyboard. The Attributes Inspector says information is not applicable for this type of segue. As I'm trying to pass data for some variables between these pages, it's rather a big deal that I can't just use prepareForSegue to do so.


How are we supposed to work around this issue?

Hi,


currently there is now way to pass data from one interface controller to a second one in a page based layout.

If you setup the pages in code by calling

                [WKInterfaceController reloadRootControllersWithNames:@[@"page1", @"page2"]
                                                             contexts:@[_data, _data]];

you can use contexts to share a single object.


Or you can use the extension delegate as a "Bridge" to store data written by the first interface controller and read by the second one. Allthoug this seems to be a very ugly workaround (at least for me) 🙂

MyData* data = ((ExtensionDelegate*)[WKExtension sharedExtension].delegate).data;


Dirk

Wow, that is pretty ugly all around. I don't understand why the watch doesn't have an app delegate like iOS code does. It's so much easier to share data that way! Thanks for the advice. Actually, would using shared data work in this case? Seems a bit like overkill to pass a few items back and forth, but I guess it would work?


I will give option 2 a try (since I already have the segues done in the storyboard) and get back with the results. Much appreciated.

Well the [WKExtension sharedExtension].delegate is the same as the app delegate for iOS is. Or did I misread something?


Dirk

how to set an identifier for a "next page" segue
 
 
Q