Friday, February 24, 2012

Woodwing: how to trigger the ModalViewController using custom web/html embedded content


Using Woodwing, we have a page that has custom html in it, using the custom web widget.



That widget has an anchor tag, that when tapped, opens a page in safari.



However, if we create the same page using the HTML widget, and a link overlay, that triggers a ModalView to display.



I'm assuming this has something to do with WoodWing's (un)documented protocols for the anchor tags, that are captured by the WoodWing shell application and used to trigger the "ModalView" display. Since everything in Woodwing generates an XML that is parsed when the app is loaded, and I've done numerous applications, this seems reasonable. However, there is very little technical documentation.



My question is: does anyone know any documentation on those protocols, or a way I can use custom-html to trigger the ModalView? I've tried replacing "http" with "ww" but no dice. It's possible it's javascript but I'm suspecting protocols...

1 comment:

  1. The UIWebViewDelegate defines the webView:shouldStartLoadWithRequest:navigationType: method that your view controller can implement. In this implementation, your code shoudl decide if it wants to handle the request (user click) or let the UIWebView handle it normally.

    For displaying a modal as a result of a click, this method would display the modal and return NO.

    ReplyDelete