Phonegap IOS中缺少载波/电池条

Phonegap IOS中缺少载波/电池条,ios,cordova,Ios,Cordova,我正在开发我的第一个Phonegap IOS应用程序。我的问题是,在载体和电池后面没有静态背景。我的应用程序(运行时)似乎完全取代了酒吧背景。我希望我的解释是正确的。 如何保持载体/电池条的背景并将我的应用程序向下推一点? 如果有帮助的话,我正在使用Jquery Mobile 这是我目前在ModelViewController中拥有的: #import <Cordova/CDVViewController.h> #import <Cordova/CDVCommandDelega

我正在开发我的第一个Phonegap IOS应用程序。我的问题是,在载体和电池后面没有静态背景。我的应用程序(运行时)似乎完全取代了酒吧背景。我希望我的解释是正确的。 如何保持载体/电池条的背景并将我的应用程序向下推一点? 如果有帮助的话,我正在使用Jquery Mobile

这是我目前在ModelViewController中拥有的:

#import <Cordova/CDVViewController.h>
#import <Cordova/CDVCommandDelegateImpl.h>
#import <Cordova/CDVCommandQueue.h>

@interface MainViewController : CDVViewController
@end

@interface MainCommandDelegate : CDVCommandDelegateImpl
@end

@interface MainCommandQueue : CDVCommandQueue
@end
#导入
#进口
#进口
@界面主视图控制器:CDVViewController
@结束
@接口MainCommandDelegate:CDVCommandDelegateImpl
@结束
@接口MainCommandQueue:CDVCommandQueue
@结束

在MainViewController.h中添加此代码

- (void)viewWillAppear:(BOOL)animated
{
 // View defaults to full size. If you want to customize the view's size, or its          subviews (e.g. webView),
 [super viewWillAppear:animated];
 // you can do so here.
 //Lower screen 20px on ios 7
 if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7)
 {
     CGRect viewBounds = [self.webView bounds];
     viewBounds.origin.y = 20;
     viewBounds.size.height = viewBounds.size.height-20;
     self.webView.frame = viewBounds;
  }
}

您正在iOS7上运行应用程序,并且您的视图位于状态栏后面?是吗?确实是。这正是发生的事情。我用安卓做了同样的尝试,没有任何问题。酷,今晚我会试试。谢谢你-我到底需要在哪里添加它?我将其添加到底部,但出现了一个错误。1Pawan,我在上面的MainViewController.h中添加了我当前拥有的。@user2110655加载到MainViewController.m中,如果您有问题,请告诉我Hi-1Pawan我让它工作了,谢谢。但现在我还有一个问题。我在页面底部有一个横幅,现在它被切成两半。