I have some issues with Status Bar Hidden logic.
I am having a flash screen before starting my game. In the flash screen controller, i use "[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];" under 'viewDidLoad' to hide the status bar and show the flash screen to occupy the entire iPhone screen.
Issue 1: It shows status bar for some fraction of seconds during my flash screen launch and then hides it. I don't want to get status bar even in the fraction of seconds also, it should just hide it once flash screen started. How to achieve it?
Issue 2: After the flash screen controller view, my game application home screen will be launched. If i use "[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];" under 'viewDidLoad' in Flash screen controller, it affects in my Game home screen view controller also. My game home screen controller also hides Status Bar. I don't want that. I want to hide the status bar only on flash screen, other views of my application should show status bar always. How to correct this?
Your suggestions are well appreciated.
step 1 : in your frameWork-Info. plst' file, add the key 'View controller-based status bar appearance' and set it to 'NO'.
The icons in the status bar at the top of the screen provide information about iPhone. On an iPhone with Face ID, there are additional status icons at the top of Control Center. Note: If you turn on a Focus, its icon appears in the status bar.
to make the status bar hidden during while your app launches, add the "status bar is initially hidden" key to your apps info plist.
then, in your first non-splash view, use
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];
in your viewDidLoad
or viewDidAppear
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With