0

iOS 怎样设置状态栏StatusBar text的颜色?

ruby created at5 years ago view count: 2373
report
回复
0
  1. UIViewControllerBasedStatusBarAppearance 设置为YES 在plist里面
  2. 在viewDidLoad里面调用 self.setNeedsStatusBarAppearanceUpdate()
  3. 最后添加MyNavigationController
import UIKit
class MyNavigationController: UINavigationController {

    override func preferredStatusBarStyle() -> UIStatusBarStyle {
        return .LightContent
    }

}
5 years ago 回复