Mud Mud - 30 days ago 12
iOS Question

Xamarin.forms, removing status bar in iOS 10

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:

status bar drawn on top of 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.

Answer Source

Add these options to your info.plist

<key>UIStatusBarHidden</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>

Or

enter image description here