1、在info.plist文件中加入View controller-based status bar appearance设置其值为YES
2、在自己写的navigationController中,重写preferredStatusBarStyle
override var preferredStatusBarStyle: UIStatusBarStyle{
return UIStatusBarStyle.lightContent
}
1、在info.plist文件中加入View controller-based status bar appearance设置其值为YES
2、在自己写的navigationController中,重写preferredStatusBarStyle
override var preferredStatusBarStyle: UIStatusBarStyle{
return UIStatusBarStyle.lightContent
}
本文标题:swift中有导航栏修改状态栏
本文链接:https://www.haomeiwen.com/subject/ryiyvdtx.html
网友评论