title: iOS: display modal view over the top of a UIWebView
body: <p>Is it possible to display a modal view over the top of a UIWebView? I have a UIViewController that loads a WebView. I then want to push a Modal View Controller over the top so that a modal view covers up the WebView temporarily...</p>
  
  <p>The WebView is working fine; here's how it's loaded in the View Controller:</p>
  
  <pre><code>- (void)loadView {
  
      // Initialize webview and add as a subview to LandscapeController's view
      myWebView = [[[UIWebView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease];
      myWebView.scalesPageToFit = YES;
      myWebView.autoresizesSubviews = YES;
      myWebView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);  
      myWebView.delegate = self;
      self.view = myWebView; 
  }
  </code></pre>
  
  <p>If I attempt to load a Modal View controller from within viewDidLoad, however, no modal view appears:</p>
  
  <pre><code>- (void)viewDidLoad {
  
      [super viewDidLoad];
  
      // Edit dcftable.html with updated figures
      NSMutableString *updated_html = [self _updateHTML:@"dcftable"];
  
      // Load altered HTML file as an NSURL request
      [self.myWebView loadHTMLString:updated_html baseURL:nil];
  
      // If user hasn't paid for dcftable, then invoke the covering modal view
      if (some_condition) {
  
          LandscapeCoverController *landscapeCoverController = [[[LandscapeCoverController alloc] init] autorelease ];
          [self presentModalViewController:landscapeCoverController animated:YES];    
      }   
  
  
  }
  </code></pre>
  
  <p>I suspect that there's something that needs to be done with the UIWebView delegate to get it to receive the new modal view...but can't find any discussion or examples of this anywhere...again, the objective is to invoke a modal view that covers over the top of the WebView. </p>
  
  <p>Thanks for any thoughts in advance!</p>