views:

40

answers:

2

How can I make a UIWebView's html/javascript to trigger a UIModalView to show up on page load?

A: 

i don't think that is possible....

Mies
+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