Search code examples
iosxamarin.iosios7statusbarmonogame

Remove iOS 7 Status Bar


I am developing a game for iOS using Monotouch and MonoGame, and I need to make the game full screen, without the status bar. In iOS 6 this was not a problem, but in iOS 7 I cannot figure out how to disable the status bar. I have found results on how to do this in Objective-C, but cannot find out how to do it in MonoTouch.

This post says that this is not possible, but the Netflix iOS 7 app has full screen with no status bar (while playing a video).


Solution

  • Add this to your info.plist before the dict tag

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

    example:

    .....
        <key>UISupportedInterfaceOrientations</key>
        <array>
            <string>UIInterfaceOrientationPortrait</string>
            <string>UIInterfaceOrientationLandscapeLeft</string>
            <string>UIInterfaceOrientationLandscapeRight</string>
        </array>
        <key>UIStatusBarHidden</key>
        <true/>
        <key>UIViewControllerBasedStatusBarAppearance</key>
        <false/>
    </dict>