self.bgView.backgroundColor = UIColor.init(patternImage: #imageLiteral(resourceName: "navigation_bar_img"));
基于viewController修改当前UIStausBarStyle方法
override var preferredStatusBarStyle: UIStatusBarStyle{get { return.lightContent}}
原文链接:https://www.f2er.com/swift/321127.html