-
All replies
-
Helpful answers
-
Jan 10, 2014 10:39 AM in response to ybsgirby markmalone,Take a look at the recommendations/limitations of the HTML object here: http://help.apple.com/iadproducer/mac/4.1/#iade083c9723
In general, this object is best used for content that confines its interaction/navigation to content within the HTML object itself. It's great for styled text, canvas animation, MathML, or imbedding remote content via an iframe.
iAd Producer has a really nice model for page navigation and loading which you should see if your design supports before rolling your own code. Page navigation can be hooked up visually by selecting any view then choosing "Go to Page" in the Interaction section of the Inspector panel. If you need to write code for navigation you can leverage the ViewController object (logically the page) by calling its transitionToViewControllerWithID('PAGE_ID') method.
Of course everything depends on your particular design, but the more you can layout visually using the built-in objects then hook into the iAd.JS interaction model the happier you'll be. If you've go any more specifics on what you'd like to build, I can be more specific.
Clear as mud?
Cheers,
-Mark
-
Jan 10, 2014 1:51 PM in response to markmaloneby markmalone,That said, getting a reference to the current page instance via its outlet name then call the instance method transitionToViewControllerWithID should do the trick.
Something like:
<a href="#" onclick="iAP.ViewController.instances['Page1'].transitionToViewControllerWithID ('Page2')"> Click Me!</a>
Where 'Page1' is the outlet value of your current page with the spaces removed and 'Page2' refers to another page with the outlet value spaces removed.
-Mark