IOS -> Cordova 将 view 下移 避免 和 状态栏重叠
- (void)viewWillAppear:(BOOL)animated { self.view.backgroundColor = [UIColor redColor]; //设置 背景颜色 // 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]; }
From: http://stackoverflow.com/questions/19209781/ios-7-status-bar-with-phonegap
相关推荐
chenxiangpeng 2020-04-30
dangai00 2020-07-18
xhpscdx 2020-05-31
ncuboy0wsq 2020-03-27
学习web前端 2020-03-23
APCDE 2020-03-04
歆萌 2020-03-03
csdnuuu 2020-01-04
水龙吟的备忘录 2019-11-18
icewizardry 2014-04-10
元元 2019-11-17
androidstudyroom 2019-11-08
czpaex 2011-09-11
OldSoldier 2011-08-18
wangdaiying 2011-05-26
qixiang0 2019-08-24