In my app I have two file xib FirstViewController.xib, SecondViewCotroller.xib and classic MainWindow.xib; in all I set statusBar at "none"; but when I launch my app I ever see this statusbar, why? where is the problem?
I'm afraid you are setting the Status Bar to "None" under the "Simulated Metrics" section. The settings in this section are there to help you visually design your screens but they have no effect when the application runs.
You can set the status bar as hidden for real in your Info.plist:
<key>UIStatusBarHidden</key>
<true/>
In the XCode interface, this is done via Info.plist --> Add Row --> "Status bar is initially hidden" --> YES.
You can also change the visibility of the status bar in code via the statusBarHidden property and the setStatusBarHidden:withAnimation: method of the UIApplication class.
Related
Could anyone tell me how to hide StatusBar in the course of launching and show it again after the launching?
Its very simple, set Status bar is initially hidden YES in Info.plist file and also Make sure your not set View controller-based status bar appearance in info.plist file
Set the UIStatusBarHidden to true or false in the info.plist in order to show or hide the status bar when launching.
<key>UIStatusBarHidden</key>
<true/>
set this in your info plist file.
iBooks's status bar
what the picture say, it's my want
How can I set my app's status bar to gray?
I only found the Default and LightContent in the UIStatusBarStyle.
How can iBooks do it?
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleDefault</string>
in info.plist
I have an app that I want to make full screen, but every solution I tried, the status bar is white, and the app doesn't run in full screen.
How can I hide the status bar?
The only correct solution from 2016 onwards:
in your apps plist file, add two rows.
"View controller-based status bar appearance" ... NO
"Status bar is initially hidden" ... YES
that's all there is to it.
<key>UIStatusBarHidden</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
So:
Goto Target setting -> General Setting --> Then find Hide status bar --> Check these option then try to run app. I think these will solve your problem.
I have tried everything suggested here: Status bar won't disappear to no avail.
My iPhone version of my app has no status bar shown, but on my iPad, which runs the scaled up version of my iPhone version, there is a status bar that won't go away!
If it makes a difference, my app uses the devices camera for a majority of the app. If you need more info/code, don't hesitate to ask! My app is iOS 7 only, and I use Xcode 5. Also, I would like the status bar gone in the whole app.
Do not suggest UIViewControllerBasedStatusBar in the plist-- it does not work.
Related Articles
https://stackoverflow.com/a/18740897/294884
https://stackoverflow.com/a/21034908/294884
https://stackoverflow.com/a/20307841/294884
For 2016 onwards all you do is:
Add these two items to your plist:
<key>UIStatusBarHidden</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
1. It is that simple
2. There is no other method.
(Note - there's a (pointless) "hide status bar" checkbox in "general settings" "deployment info" section. This simply reads the plist file, it's a completely pointless checkbox.)
Historic answers...
I've removed the historic answers as they are completely useless. (If any historians need to read it, click "edit history".)
Have you already, on your info.plist file, added two new attributes if not present? Please try setting "Status bar is initially hidden" to "YES" and also set "UIViewControllerBasedStatusBarAppearance" to "NO". This will hide status bar for your app.
To clarify, I'm not trying to do this on my own app, so I don't have access to the source code. I am trying to edit info.plist or any other files in the installed .app file on my device to remove the status bar from an app, namely Google Chrome
I'm trying to hide the statusbar on Google Chrome. I added UIViewControllerBasedStatusBarAppearance = false and UIStatusBarHidden = true to info.plist, but all that got me was a grey bar where the status bar used to be. So close!
Are there any other ways to force hide the status bar in Chrome or any other app on iOS 7?
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:NO];
OR
Or
try
- (BOOL)prefersStatusBarHidden { return YES; } in all of your view controllers.
Try this.
add this key into info.plist file
View controller-based status bar appearance
set value for this to:- No
I added the following to my info.plist:
Status bar is initially hidden with value YES
I also have View controller-based status bar appearance with value NO