Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/115.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
删除iOS 7状态栏_Ios_Xamarin.ios_Ios7_Statusbar_Monogame - Fatal编程技术网

删除iOS 7状态栏

删除iOS 7状态栏,ios,xamarin.ios,ios7,statusbar,monogame,Ios,Xamarin.ios,Ios7,Statusbar,Monogame,我正在为iOS开发一款使用Monotouch和MonoGame的游戏,我需要让游戏全屏显示,不带状态栏。在iOS 6中,这不是问题,但在iOS 7中,我不知道如何禁用状态栏。我已经在Objective-C中找到了如何做到这一点的结果,但无法在MonotTouch中找到如何做到这一点 post说这是不可能的,但Netflix iOS 7应用程序全屏无状态栏(播放视频时)。将此添加到dict标记之前的info.plist中 <key>UIStatusBarHidden</key&g

我正在为iOS开发一款使用Monotouch和MonoGame的游戏,我需要让游戏全屏显示,不带状态栏。在iOS 6中,这不是问题,但在iOS 7中,我不知道如何禁用状态栏。我已经在Objective-C中找到了如何做到这一点的结果,但无法在MonotTouch中找到如何做到这一点


post说这是不可能的,但Netflix iOS 7应用程序全屏无状态栏(播放视频时)。

将此添加到dict标记之前的info.plist中

<key>UIStatusBarHidden</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
UIStatusBarHidden
UIViewControllerBasedStatusBarAppearance
例如:

.....
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UIStatusBarHidden</key>
    <true/>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
</dict>
。。。。。
UI支持接口方向
UIInterfaceOrientationPortrait
UIInterface方向和左视图
UIInterfaceOrientationAndscapeRight
UIStatusBarHidden
UIViewControllerBasedStatusBarAppearance

我发现了这一点,我不知道是否所有这些东西都是使这项工作发挥作用所必需的,但这就是我所做的

  • 我在info.plist中添加了带有布尔值“Yes”的“状态栏最初是隐藏的”
  • 我在info.plist中添加了带有布尔值“No”的“UIViewControllerBasedStatusBarApp”
  • 在iOSGameViewController中,我添加了:

    public override bool PrefersStatusBarHidden ()
    {
        return true;
    }
    

  • 现在状态栏不显示在游戏中

    有人否决了这个问题,如果你对我是如何提出这个问题有一些反馈,请让我知道,只是在没有任何反馈的情况下否决对任何人都没有帮助。他们用户没有要求代码,他要求帮助“找出方法”,为以前尝试过但未成功的解决方案提供参考和链接。这很有效,以及我上面的回答。谢谢这非常有效——我们不需要其他plist更改。