I know that are already some stackoverflow questions that say how to change the status bar for all view controllers. I am currently changing the color of status bar this way:
if(IS_IOS7)
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
In the application:DidFinishLaunching
Additionally, I have changed the value of UIViewControllerBasedStatusBarAppearance
in the plist to NO
. However, in the splashscreen it stills shows the status bar text with the black color.
Is it possible to change the color of the status bar text color in the splash screen?
Set the
UIViewControllerBasedStatusBarAppearance
to No in the plistThen add the following code in did finish launch option
Please follow this code it worked for me
In the project plist file add the "Status Bar Style" property (key is
UIStatusBarStyle
). Then ignore all the possible values listed in the drop down for this property and typeUIStatusBarStyleLightContent
instead.And you don't have to set
UIViewControllerBasedStatusBarAppearance
toNO
in your plist, you can set thepreferredStatusBarStyle
you want to your view controllers.Here is Apple Guidelines/Instruction about status bar change.
Here is - How to change status bar style:
If you want to set status bar style, application level then set
UIViewControllerBasedStatusBarAppearance
toNO
in your `.plist' file.if you wan to set status bar style, at view controller level then follow these steps:
UIViewControllerBasedStatusBarAppearance
toYES
in the.plist
file, if you need to set status bar style at UIViewController level only.In the viewDidLoad add function -
setNeedsStatusBarAppearanceUpdate
override preferredStatusBarStyle in your view controller.
-
Set value of .plist according to status bar style setup level.
You can set background color for status bar during application launch or during viewDidLoad of your view controller.
Here is result:
You can do this without writing any line of code
Do the following to make the status bar text color white through the whole app
On you project plist file:
UIStatusBarStyleLightContent
NO
NO
You can do the following things for getting light color status bar throughout the application.
Select the name of the project in the project navigator. Select the name of a target from the list in the left column of the project editor. Click General at the top of the project editor. Set Status Bar Style -> Light
You can do the following things for getting light color status bar throughout the application.
In your plist file add the following values:
This will help you to get the status bar in WHITE colour throughout the application including SPLASH SCREEN.