Hide statusbar during splash screen
This is updated for Swift 3 of Xcode 8.3.3
In your Info.plist add the following key:
Then in your AppDelegate file add the following in didFinishLaunchingWithOptions
section:
func application(_application:UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
UIApplication.shared.isStatusBarHidden = false
return true
}
That should sort out your problem.
You can also configure the launch colour in your project Build Settings if this is a problem for you:
Hope that helps!
Hide status bar in Launch Screen
To Hide Status Bar initially on launch screen, set Hide status bar
check mark on ✓
OR
In Your Info.plist add: Status bar is initially hidden
YES
.
The above both option having same impact.
Additionally
To Hide Status Bar on specific ViewController override
prefersStatusBarHidden
with true
override var prefersStatusBarHidden: Bool{
return true
}
Want to hide status bar just in launchscreen in iOS?
you can simply check Hide status bar
in your target's general settings. This should hide your status bar on the launch screen but show it on the initial viewcontroller.
how to hide status bar when splash screen appears in iphone?
I'm pretty sure that if your Info.plist file has the Status bar is initially hidden
value set to YES
, then it won't show while your application is loading. Once your application has loaded, you can re-show the status bar using UIApplication's setStatusBarHidden:animated:
method.
Hide status bar on launch image
Use this code for hiding status bar:
ObjectiveC:
[[UIApplication sharedApplication] setStatusBarHidden:YES
withAnimation:UIStatusBarAnimationSlide];
Swift:
UIApplication.sharedApplication().setStatusBarHidden(true, withAnimation: .Slide)
If you don't need status bar in the beginning. Add this setting (UIStatusBarHidden
) in your Info plist
file:
Status bar is initially hidden
with a value of YES
.
Use this code anywhere in the app to show the status bar for that particular View Controller
ObjectiveC:
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationSlide];
Swift:
UIApplication.sharedApplication().setStatusBarHidden(false, withAnimation: .Slide)
Cordova: How do you hide the status bar on the splash/launch screen?
It is not the full answer that makes Cordova do it automatically. But I went into my .plist file for the iOS build and added:
UIStatusBarHidden = true
UIViewControllerBasedStatusBarAppearance = false
This makes it behave the correct way and is not getting overwritten by Cordova when I do a build so it will work for now.
If anyone finds or knows of a better way to enforce these settings, feel free to post it and I will either update this answer or choose yours next time I notice it. Thank you!
Android status bar hide/change color in splash screen
Okay, after more experiments, it turns out I had some sort of a cache problem. I tried installing my app on another phone and it worked as intended, whereas on the first phone I installed the app, it's not updating. So just so you know, the simple solution of android:statusBarColor is enough to make it work.
Now about that cache problem, it's not the first time I have it with that screen, it must be the particular condition of having no layout and a drawable as a background. I tried invalidating the cache in Android Studio, I cleaned and rebuilt the project, I uninstalled the app on the phone but nothing works. So if you are in this cofiguration, just try to run your app on another phone if you can, just to check that your solution isn't already working, just not updating on your device.
Related Topics
How to Replace Limited Number of Occurrences in String
Ios/Tvos Playground Fails with "Unable to Find Execution Service for Selected Run Destination"
Nsdateformatter Detect 24-Hour Clock in Os X and iOS
How to Create an Uppercase Version of a String in Swiftui
Swift: Overriding Typealias Inside Subclass
From the Swift Repl, How to Get a List of Available Modules
Is Dispatchsemaphore a Good Replacement for Nslock
Swiftui: Navigationlink Not Working If Not in a List
Spritekit Particle Emitter Multi Image
What Does "Constrain to Margins" Mean in Interface Builder in Xcode 6.0.1
Reflection with Swift - Get Functions Name of a Class
Swift Threading with Dispatchgroup
Synchronized Realm - Airplane Mode
How to Play Avplayeritems Immediately