Happy New Year!
I want to hide status bar after calling UIImagePickerController on iOS 10.2. You know there are already several questions about it with some answers, but I'm afraid the answers don't work for Swift 3.0.
The suggested answers are:
- extend UINavigationController to override preferStatusBarHidden, because UIImagePickerController is a subclass of UINavigationController.
So I tried:
extension UINavigationController{
open override var prefersStatusBarHidden: Bool{
return true
}
}
- extend UIImagePickerController to override prefersStatusBarHidden.
So I tried:
extension UIImagePickerController{
open override var prefersStatusBarHidden: Bool{
return true
}
}
- create and use a subclass of UIImagePicker
So I tried:
class MyImagePickerController: UIImagePickerController{
override var prefersStatusBarHidden: Bool{
return true
}
}
But, unfortunately, none of the above solutions seems working for me. I'd like iOS developers who are proficient in Swift 3.0 to let me know how to hide status bar after calling UIImagePickerController.
Thank you for your interest and time!