title: How can I change the UIWebView background color after sliding down UIWebView to fix the iOS7 status bar overlay issue?
body: <p>I'm writing a Phonegap 3.0+ app. </p>
  
  <p>There is an issue with the status bar overlapping views in iOS7 which user <a href="https://stackoverflow.com/a/19249775/972191">Ludwig Kristoffersson provided a working answer here</a><br> </p>
  
  <p>Now that I have UIWebView with a 20px top margin, how can I change the UIWebView background color?  I need the area behind the status bar to be the same background color as the "people" toolbar.</p>
  
  <p><img src="https://i.stack.imgur.com/w1ZX5.png" alt="enter image description here"></p>
  
  <p>I have almost no experience in Objective C, and have been looking through possible SO questions to find a working solution but with no success.</p>
  
  <p><a href="https://stackoverflow.com/questions/6605140/uiwebview-background-color">UIWebView background color</a><br>
  <a href="https://stackoverflow.com/questions/8667150/uiwebview-background-is-set-to-clear-color-but-it-is-not-transparent?lq=1">UIWebView background is set to Clear Color, but it is not transparent</a><br>
  <br><br>
  Below is the code that I've tried so far:</p>
  
  <pre><code>- (void)viewWillAppear:(BOOL)animated {
      //Lower screen 20px on ios 7
      if([[[UIDevice currentDevice] systemVersion] floatValue] &gt;= 7) {
          CGRect viewBounds = [self.webView bounds];
          viewBounds.origin.y = 20;
          viewBounds.size.height = viewBounds.size.height - 20;
          self.webView.frame = viewBounds;
          [self.webView setOpaque:YES];
  
          //neither of these seem to work when uncommented:
    //    [self.webView setBackgroundColor:[UIColor grayColor]];
    //    self.webView.backgroundColor=[UIColor grayColor];
          }
      [super viewWillAppear:animated];
      }
  </code></pre>
  
  <p><br></p>
  
  <hr>
  
  <p><strong>UPDATE 1</strong>         </p>
  
  <pre><code>- (void)viewWillAppear:(BOOL)animated
  {
  //Lower screen 20px on ios 7
  if ([[[UIDevice currentDevice] systemVersion] floatValue] &gt;= 7) {
      CGRect viewBounds = [self.webView bounds];
      viewBounds.origin.y = 20;
      viewBounds.size.height = viewBounds.size.height - 20;
      self.webView.frame = viewBounds;
  
      self.webView.backgroundColor = [UIColor grayColor];
      self.webView.opaque=NO;
  }
  [super viewWillAppear:animated];
  }
  </code></pre>
  
  <p>That still seems to give me a white background behind the status bar, rather than gray.</p>
  
  <p>The result I'm hoping for is like this:
  <img src="https://i.stack.imgur.com/OAHzt.png" alt="enter image description here"></p>