Phonegap在ios7上系统状态栏的问题解决
生活随笔
收集整理的這篇文章主要介紹了
Phonegap在ios7上系统状态栏的问题解决
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
用Phonegap+jqm開發的應用,在ios6下沒問題,但是在ios7下會出現如下系統狀態欄和header重合的問題,搜索了一下,發現這其實是 phonegap當前版本的一個已知問題,通過修改./platforms/ios/whhe/Classes /MainViewController.m,就可以解決
?
- (void)viewWillAppear:(BOOL)animated { // View defaults to full size. If you want to customize the view's size, or its subviews (e.g. webView), // 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; } [super viewWillAppear:animated]; }參考:
http://www.tuicool.com/articles/YRzIJn
http://stackoverflow.com/questions/19209781/ios-7-status-bar-with-phonegap
轉載于:https://www.cnblogs.com/lear/p/3408631.html
總結
以上是生活随笔為你收集整理的Phonegap在ios7上系统状态栏的问题解决的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 控件列[Coolite]上传文件
- 下一篇: 打包jar文件后的spring部署及hi