10

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).

Community
  • 1
  • 1
weaverx9x9
  • 495
  • 6
  • 17
  • 3
    Someone down voted this question, if you have some feedback about how I asked the question, please let me know, just down voting it without any feedback isn't helpful to anyone. – weaverx9x9 Nov 06 '13 at 14:51
  • They user didn't ask for code, he asked help to "figure out how", giving references and link for solutions previously tried unsuccessfully. – Daniele D. Nov 26 '15 at 11:00

2 Answers2

17

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>
Xuan
  • 460
  • 5
  • 13
8

I figured this out, I don't know if all of these things are necessary to make this work, but this is what I did,

  1. I added "Status bar is initially hidden" with boolean value "Yes" to the info.plist
  2. I added "UIViewControllerBasedStatusBarApp" with boolean value "No" to the info.plist
  3. In iOSGameViewController I added:

    public override bool PrefersStatusBarHidden ()
    {
        return true;
    }
    

Now the status bar is not displayed in the game.

weaverx9x9
  • 495
  • 6
  • 17