Phonegap IOS中缺少运营商/电池条

时间:2013-11-25 12:50:39

标签: ios cordova

我正在开发我的第一个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

1 个答案:

答案 0 :(得分:1)

在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;
  }
}
相关问题