smintel

Q: Global Navigation/didEnterWidgetMode

How do I navigate to a page in javascript from a global js function?

 

from within a page   this.viewController.transitionToViewControllerWithID('pageName');   is working fine - but I don't quite understand how to do it from a global scope.

 

A related question - the reason I want to do the above is that in iBooks author, if you close and then reopen a widget, it opens where you left it, it doesn't reset to the start. In iBooks widgets that I have coded by hand I used to use a function called widget.didEnterWidgetMode() to reset the widget when it is reopened. So I want to do the same thing in iAd Producer - something like:

 

widget.didEnterWidgetMode=function(){

 

transitionToViewControllerWithID('StartPage');

 

};

 

 

But as yet I haven't managed to get this working - both because I can't get the didEnterWidgetMode function to fire, and also I don't know how to navigate to a page from a global functon.

 

Any hints appreciated!

Posted on Jun 12, 2013 9:59 AM