IOS7 status bar Keep white __ios on black background

Source: Internet
Author: User

A feasible method has been tested:

Plist uiviewcontrollerbasedstatusbarappearance set to Yes;

Viewdidload Riga [self setneedsstatusbarappearanceupdate];

Sets the background color of the view to black;

Append method

-(Uistatusbarstyle) preferredstatusbarstyle{return uistatusbarstylelightcontent;}

Reprint: Http://www.w3c.com.cn/ios7 status bar keep white on black background




IOS7 Set status bar color

The IOS7 setting status bar is transparent, and the View Controller view Controller is full screen, so when you use TableView you can overlay the entire tableview on view, and then set the view background to the corresponding color, Then the State sample becomes the right color. If the background is black, the status bar ink to recognize the text is black, so also modify the color of the text.



Ways to change the text of the status bar:

(1). Add View controller-based status bar appearance in Info.plist to No,

(2). Self.view.backgroundColor = [Uicolorblackcolor];

Of course you don't have to set the entire background to black, you can also only add a black background view on the position (0, 0, 320, 20);


In this way, the status bar of a view controller becomes white on a black background.

Reprint: http://blog.csdn.net/yuanya/article/details/16336645

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.