Xamarin.forms, removing status bar in iOS 10 - ios

I'm using the following code in AppDelegate.FinishedLaunching to removing the status bar in iOS from my Xamarin forms app:
UIApplication.SharedApplication.SetStatusBarHidden (true, UIStatusBarAnimation.None);
This does removes the space used by the status bar, but the contents of the status bar are still being rendered.
At the top of this image (my app in portrait mode, brightness enhanced), you can see the clock, battery indicator, et al. being drawn right over my app:
How do I get rid of this?
This is a Page in a Forms app that consists of a single SKCanvasView, if that's relevant.

Add these options to your info.plist
<key>UIStatusBarHidden</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
Or

Related

how can i set my app's status bar to gray?

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

How to completely remove the iOS status bar

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.

Status bar won't go away on scaled up version of iOS 7 app

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.

White UIStatusbar slightly blinking when reopening app?

I've got a little bit of an issue with the status bar for iOS7, iPhone 4 and up.
Since my app's background is dark, I need the status bar to be white, which looks fine.
However, when minimizing the app, waiting a few seconds and going back into the app, it slightly flashes from full white to darker white back to full white within a period of less than half a second.
You can reproduce this by simply creating an empty new XCode project, setting the statusbar to white (see below how I did that), then running the app on simulator or device, minimizing it and maximizing it again.
Things tried:
UIViewController-based appearance with:
- (UIStatusBarStyle)preferredStatusBarStyle
{
return UIStatusBarStyleLightContent;
}
and
- (UIStatusBarAnimation)preferredStatusBarUpdateAnimation {
return UIStatusBarAnimationNone;
}
And view controller-based status bar appearance set to NO in the PLIST, with also:
Transparent black style (alpha of 0.5)
Status bar is initially hidden set to NO in both situations.
Is this something out of my programmatic control?
I had the same issue and solved it by setting on the info.plist file the following values, on iOS 10*:
Status bar style = UIStatusBarStyleLightContent
View controller-based status bar appearance = NO
If you prefer directly in your Info.plist:
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>

IOS: statusbar problem

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.

Resources