設(shè)置電池欄為白色
在Appdelegate里
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];
同時(shí)info.plist添加
View controller-based status bar appearance = NO
啟動(dòng)時(shí)隱藏電池欄
設(shè)置info.plist
Status bar is initially hidden = YES
但是隱藏了電池欄會(huì)導(dǎo)致電池欄不顯示,所以需要在Appdelegate里添加
[[UIApplication sharedApplication]setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];