您的当前位置:首页正文

xamarin.forms在vs中修改状态栏字体颜色为白色

来源:华佗小知识

1:在 AppDelegate.cs, FinishedLaunching() 方法里加一下代码

UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false);

UIApplication.SharedApplication.SetStatusBarHidden(false, false);

2:在Info.plist:中加入

<key>UIViewControllerBasedStatusBarAppearance</key>

<false/>

<key>UIStatusBarHidden</key>

<true/>