IOS7 default status bar text color is black
Modify the method to white: (Chenyong note my status bar style is still the default value for Gray style (default))
1 Set the view controller-based status bar appearance to No in Info.plist
2 Add in the Viewdidload method in the Viewcontroller that needs to change the color of the status bar:
[[UIApplication sharedapplication] setstatusbarstyle:uistatusbarstylelightcontent];
As follows:
-(void) viewdidload{ [Super Viewdidload]; // Do any additional setup after loading the view from its nib. [[UIApplication sharedapplication] setstatusbarstyle:uistatusbarstyleblacktranslucent];}
If you need to change color in all of the view, you can write it in the related method of the parent class.
Status bar merge issues encountered when using Cordova
- (void) Viewwillappear: (BOOL) animated{//View defaults to full size. If you want to customize the view's size, or its subviews (e.g. WebView),//You can do it here . //problems with the navigation and status bar merging floatCurrentVersion =[[[ Uidevice Currentdevice] systemversion] floatvalue]; if(CurrentVersion >=7) { //bounds is the origin of the coordinates in its upper left corner .CGRect viewbounds =[Self.webview bounds]; VIEWBOUNDS.ORIGIN.Y= -; ViewBounds.size.height= ViewBounds.size.height- -; Self.webView.frame=Viewbounds; Self.view.backgroundColor=[Uicolor Blackcolor]; } [Super viewwillappear:animated];}
Color settings for iOS6 and iOS7 and more than 7 status bars