How to expand UIWebView on click
I'm working on an Ad SDK for iOS and I have a narrow banner-size UIWebView that displays a complex HTML that I receive from an ad server. I don't know anything about structure of that HTML (i.e. it may change).
At some point user taps on that UIWebView, which causes the content of that ad to become full-screen, so I need to expand my UIWebView and show it in the modal view (via presentModalViewController).
Is there a way to either take my existing UIWebView and reattach it to my new modal view wh开发者_如何学Goile keeping its state (whatever user clicked on)?
Or alternatively how can I simulate touch on UIWebView, since I could create new UIWebView in my modal view and load the same HTML, but then I need to re-create its state after initial tap by somehow sending a tap event programmatically.
Use UITapGestureRecognizer, make that WebView full-screen and move to the front layer.
精彩评论