"iOS Development-status bar" about how to change the system comes with the status bar (turns white or hidden)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.