1.使AppDelegate控制狀態(tài)欄的改變
在info.plist中加View controller-based status bar appearance 設(shè)置為NO
2.在需要設(shè)置狀態(tài)欄的地方設(shè)置
[UIApplicationsharedApplication].statusBarStyle=UIStatusBarStyleLightContent;
控制器控制狀態(tài)欄的顯示與隱藏
在info.plist中
View controller-based status bar appearance 設(shè)置為YES
然后在控制器中
-(BOOL)prefersStatusBarHidden{
return true;
}