vendredi 8 mai 2015

Get WatchKit interface controller instances created with presentControllerWithNames:contexts:

I'm presenting a page based modal using [self presentControllerWithNames:self.controllerNames contexts:self.controllerContexts];, where controllerNames is just an NSArray of NSStrings containing my interface controllers names. The problem is that I would like to access the created controllers.

The documentations says that

WatchKit loads and initializes the new interface controllers and animates them into position on top of the current interface controller.

but I would like to have a reference to them, in order to call the becomeCurrentPage method from outside.

So, I would like to be able to save those controllers after they are created in a list, and programmatically change the page using something like [self.controllers[2] becomeCurrentPage].

Aucun commentaire:

Enregistrer un commentaire