I already answered sth similar here: how to change statusbar color in one view controller using swift?
Set View controller-based status bar appearance
in your project.plist to NO
Subclass the MFMailViewController
and implement custom viewWillAppear
and viewWillDisappear
functions
Use viewWillAppear
and will viewWillDisappear
to set and reset the statusBarStyle, while keeping a property with the previous statusBarStyle like this
let initialStatusBarStyle : UIStatusBarStyle
func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
initialStatusBarStyle = UIApplication.sharedApplication().statusBarStyle
UIApplication.sharedApplication().setStatusBarStyle(.LightContent, animated: animated)
}
func viewWillDisappear(animated: Bool) {
super.viewWillDisappear(animated)
UIApplication.sharedApplication().setStatusBarStyle(initialStatusBarStyle, animated: animated)
}