Can a modal view be displayed on top of a UIWebView? I have a UIViewController that loads a WebView. Then I want to click the Modal View Controller from above so that the modal view temporarily closes the WebView ...
WebView is working fine; here, how it loads into the view controller:
- (void)loadView {
myWebView = [[[UIWebView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease];
myWebView.scalesPageToFit = YES;
myWebView.autoresizesSubviews = YES;
myWebView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
myWebView.delegate = self;
self.view = myWebView;
}
If I try to load the Modal View controller from viewDidLoad, the modal view will not appear:
- (void)viewDidLoad {
[super viewDidLoad];
NSMutableString *updated_html = [self _updateHTML:@"dcftable"];
[self.myWebView loadHTMLString:updated_html baseURL:nil];
if (some_condition) {
LandscapeCoverController *landscapeCoverController = [[[LandscapeCoverController alloc] init] autorelease ];
[self presentModalViewController:landscapeCoverController animated:YES];
}
}
I suspect that there is something that needs to be done with the UIWebView delegate in order to get it to get a new modal view ... but cannot find any discussion or examples of this anywhere ... again, the goal is to get called a modal view that spans the top of WebView.
Thanks for any thoughts in advance!