MFMailComposeViewController bar background color not changing in iOS7

前端 未结 9 1478
情歌与酒
情歌与酒 2020-12-31 00:32

I\'m trying to change the background color of the MFMailComposeViewController in iOS7 but I cannot make it work.

I\'m

9条回答
  •  自闭症患者
    2020-12-31 01:12

    Swift 3 solution:

    extension MFMailComposeViewController {
        override open func viewDidAppear(_ animated: Bool) {
            super.viewDidAppear(animated)
            UIApplication.shared.statusBarStyle = UIStatusBarStyle.lightContent
        }
    
        open override func viewDidLoad() {
            super.viewDidLoad()
            navigationBar.isTranslucent = false
            navigationBar.isOpaque = false
            navigationBar.barTintColor = UIColor.white
            navigationBar.tintColor = UIColor.white
        }
    }
    

提交回复
热议问题