How can I make a UIWebView's html/javascript to trigger a UIModalView to show up on page load?
+1
A:
You can use one of the following delegates to catch a page before it loads:
- (void)webViewDidStartLoad:(UIWebView *)webView;
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType;
You can check the URL that is being loaded with:
[[[webView request] URL] absoluteString];
Then create and show your UIModalView.
Tal Bereznitskey
2010-07-27 21:02:09