【问题标题】:Change Status Bar color and text color of status bar in Xamarin Forms [duplicate]更改 Xamarin Forms 中状态栏的状态栏颜色和文本颜色 [重复]
【发布时间】:2019-12-31 05:55:48
【问题描述】:

我们如何在 xamarin 表单 iOS 中更改状态栏颜色的颜色。

【问题讨论】:

    标签: xamarin xamarin.ios


    【解决方案1】:

    一般来说,你可以在启动时隐藏状态栏,但如果你想有时间覆盖它,你需要进入你的 Info.plist 文件。您将找到一个状态栏条目,您只需将其更改为 Light Content,然后它将显示白色文本和图标。或者在 info.plist 中设置此信息。

    <key>UIStatusBarStyle</key>
    <string>UIStatusBarStyleLightContent</string>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
    

    设置导航页 BarTextcolor 和 BarBackgroundColor 属性

    MainPage = new NavigationPage(new Pages.Security.Login()) { BarTextColor = Color.White , BarBackgroundColor= Color.Blue};
    

    【讨论】:

    • @Rahul 如果解决记得标记它。
    猜你喜欢
    • 2017-10-29
    • 2019-06-15
    • 1970-01-01
    • 2017-08-21
    • 2014-05-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多