Home Ask Login Register

Developers Planet

Your answer is one click away!

Peter Pik February 2016

Hide statusbar during splash screen

I'm trying to hide the statusbar during splash screen, which works fine when i add "Status bar is initially hidden" to plist and set value to YES, however this remove the statusBar from the enitre application, even though i've added "View controller-based status bar appearance" to plist and set value to NO and added following to appdelegate:

 UIApplication.sharedApplication().statusBarStyle = UIStatusBarStyle.LightContent 

How can i remove the statusBar initially without removing it in the rest of the application?


David Yang Liu February 2016

    UIApplication.sharedApplication().setStatusBarHidden(true, withAnimation: UIStatusBarAnimation)

Whirlwind February 2016

In your Project Settings -> General-> Deployment Info, check "Hide status bar" field.

enter image description here

Next in your view controller override - prefersStatusBarHidden method, like this:

override func prefersStatusBarHidden() -> Bool {
   return false

Post Status

Asked in February 2016
Viewed 1,749 times
Voted 7
Answered 2 times


Leave an answer

Quote of the day: live life