ios - Xamarin.forms,删除 iOS 10 中的状态栏

标签 ios xamarin xamarin.ios xamarin.forms

我在 AppDelegate.FinishedLaunching 中使用以下代码从我的 Xamarin 表单应用程序中删除 iOS 中的状态栏:

  UIApplication.SharedApplication.SetStatusBarHidden (true, UIStatusBarAnimation.None);

这确实移除了状态栏使用的空间,但状态栏的内容仍在呈现。

在此图像(我的应用程序处于纵向模式,亮度增强)的顶部,您可以看到时钟、电池指示器等。被绘制在我的应用程序上:

status bar drawn on top of my app

我该如何摆脱它?

这是 Forms 应用程序中的一个页面,它由一个 SKCanvasView 组成(如果相关的话)。

最佳答案

将这些选项添加到您的 info.plist

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

或者

enter image description here

关于ios - Xamarin.forms,删除 iOS 10 中的状态栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45785104/

相关文章:

c# - Jenkins 无法通过缺少对程序集 netstandard 的引用来构建 Xamarin iOS 项目

iphone - 静态变量使用不当?

f# - MonoFramework 的 FSharp 项目的目标?

uiviewcontroller - ShouldAutorotate 和 GetSupportedInterfaceOrientations 未在 Xamarin.iOS 中调用

ios - 处理 CAKeyFrameAnimation 的正确方法

c# - 为什么mono touch可以用C#写iOS app并且可以提交到AppStore?

ios - SWRevealViewController 滑动手势导致应用程序崩溃

ios - 如何从 JavaScript 向 JavaScript 发送 React Native 事件

ios - 有谁知道 Apple iTunes 是否会接受浏览器加载网站的单页应用程序

xamarin.ios - 单点触控 : Unregister a licence