Xamarin.iOS状态栏在更改其文本颜色时消失 [英] Xamarin.iOS Status Bar Disappears When Changing Its Text Color

查看:122
本文介绍了Xamarin.iOS状态栏在更改其文本颜色时消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更改文字颜色时,如何避免在Xamarin.iOS上隐藏状态栏?

How do I avoid hiding the Status Bar on Xamarin.iOS when changing its text color?

尝试更改我的iOS状态栏的颜色后,我没有状态栏了.

After trying to change the color of my iOS Status Bar, I don't have a status bar anymore.

我删除了在info.plist中添加的属性,但随后状态栏文本颜色仍为黑色.

I remove the property I added in info.plist, but then my status bar text color remains black.

这就是我所做的,遵循以下步骤:

  • 更新了info.plist,添加了布尔属性View Controller-Based Status Bar Appearance并将其设置为No
  • 添加到App.cs的主页面中,该主页面是一个导航页面,BarTextColor = Color.White
  • Updated info.plist adding the boolean property View Controller-Based Status Bar Appearance and set it to No
  • Added in the App.cs, in my MainPage which is a NavigationPage, BarTextColor = Color.White

推荐答案

有两种方法可以隐藏iOS状态栏.以下是Xamarin.iOS源代码中要验证的内容:

There are a couple ways to hide the iOS Status Bar. Here are the things to verify in the Xamarin.iOS source code:

Info.plist中,确保Status bar is initially hiddenNo

搜索代码以找到对UIApplication.SharedApplication.StatusBarHidden的任何引用,并确保其为false

Search the code to find any references to UIApplication.SharedApplication.StatusBarHidden and ensure that it is false

这篇关于Xamarin.iOS状态栏在更改其文本颜色时消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆