一、狀態欄重疊問題
1、在info.plist中新增 View controller-based status bar appearance 項並且將Value設置成 NO 這樣狀態欄就變成白字了。
2、在AppDelegate.m中加入下面的代碼,判斷系統版本然後將window的frame下拉20個像素
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
self.window.frame = CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20);
UIApplication *myApp = [UIApplication sharedApplication];
[myApp setStatusBarStyle: UIStatusBarStyleLightContent];
}
二、隱藏狀態欄
找到Info.plist文件
不但要在Info.plist中增加 Status bar is initially hidden一行,選擇爲 YES,
還需增加 View controller-based status bar appearance 一行,選擇爲 NO。