Phonegap在ios7上系统状态栏的问题解决
生活随笔
收集整理的這篇文章主要介紹了
Phonegap在ios7上系统状态栏的问题解决
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
用Phonegap+jqm開(kāi)發(fā)的應(yīng)用,在ios6下沒(méi)問(wèn)題,但是在ios7下會(huì)出現(xiàn)如下系統(tǒng)狀態(tài)欄和header重合的問(wèn)題,搜索了一下,發(fā)現(xiàn)這其實(shí)是 phonegap當(dāng)前版本的一個(gè)已知問(wèn)題,通過(guò)修改./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
轉(zhuǎn)載于:https://www.cnblogs.com/lear/p/3408631.html
總結(jié)
以上是生活随笔為你收集整理的Phonegap在ios7上系统状态栏的问题解决的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 控件列[Coolite]上传文件
- 下一篇: android系统框架()