In MainViewController.m, add:


- (void)viewDidLayoutSubviews{ 

  if ([self respondsToSelector:@selector(topLayoutGuide)]) // iOS 7 or above 
  { 
    CGFloat top = self.topLayoutGuide.length; 
    if(self.webView.frame.origin.y == 0){ 
      // We only want to do this once, or if the view has somehow been "restored" by other code. 
      self.webView.frame = CGRectMake(self.webView.frame.origin.x, self.webView.frame.origin.y + top, self.webView.frame.size.width, self.webView.frame.size.height - top); 
    } 
  } 
}


在MainViewController.m中添加代码

在MainViewController.m中添加代码

参考文章地址:http://community.phonegap.com/nitobi/topics/inconsistent_ios_7_status_bar_build_problem