iOS Change status bar color

Source: Internet
Author: User

Http://stackoverflow.com/questions/17678881/how-to-change-status-bar-text-color-in-ios-7

An answer on the StackOverflow

Wilsontgh

Alternatively, you can choose to exit View-controller based on the appearance of the status bar

1. Set Uiviewcontrollerbasedstatusbarappearance to NO.

2. Call [[UIApplication sharedapplication] setstatusbarstyle:uistatusbarstylelightcontent];

Lucas

In fact, without writing any code can be achieved.

Follow the steps below to show the status bar text in the entire app as white:

In the project format file

    • Status Bar Style:uistatusbarstylelightcontent
    • View controller-based status Bar Appearance:no
    • Status Bar is initially hidden:no

Pradeep Mahdevu

Set ' View controller-based status bar appearance ' to NO in Info.plist

Add in Appdelegate:

1 [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

To

1234 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{   ......   ...}

Stepik21

It's useless to me, here's my solution:

Add in Info.plist

Uiviewcontrollerbasedstatusbarappearance, set the value to NO

And then didfinishlaunchingwithoptions the appdelegate, add the code:

12 [application setStatusBarHidden:NO];[application setStatusBarStyle:UIStatusBarStyleLightContent];

iOS Change status bar color

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.