0.环境
swift 4、
iOS 11
1.第一步
在 info.plist中,新添加一行View controller-based status bar appearance,值设置为NO
2.第二步
在指定的ViewController中,覆盖viewWillAppear方法,如下:
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
UIApplication.shared.statusBarStyle = .lightContent
}















网友评论