Simple method IOS7 after the system status bar is given to the controller management
You can change the status bar just by implementing the method in the controller.
//使状态栏变为白色-(UIStatusBarStyle)preferredStatusBarStyle { return UIStatusBarStyleLightContent;}
//隐藏状态栏-(BOOL)prefersStatusBarHidden { returnYES;}
The ultimate method Sometimes the above method cannot change the status bar, such as the participation of Uitabbarcontroller and Uinavigationcontroller
① Add this option in the Info.plist file, in the last party
The meaning of this sentence is not to let the status bar to the controller management
② Implementing status bar control in the Didfinishlaunchingwithoptions method in the DELEGATE.M file
//让状态栏变为白色,不让他隐藏- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { application.statusBarStyle = UIStatusBarStyleLightContent; application.statusBarHiddenNO; returnYES;}
"iOS Development-status bar" about how to change the system comes with the status bar (turns white or hidden)