Closed kirand777 closed 5 years ago
As you can subclass PBRevealViewController you can override these properties by yourself.
For example, assume your main view controller is a UINavigationController subclass, and you want to hide the status bar:
class RevealViewController: PBRevealViewController, PBRevealViewControllerDelegate {
override var childForStatusBarHidden: UIViewController? {
guard let mainViewController = self.mainViewController as? UINavigationController else {return nil}
return mainViewController.topViewController
}
override func viewDidLoad() {
super.viewDidLoad()
self.setNeedsStatusBarAppearanceUpdate()
}
}
And in your main view controller, the top view controller, override:
override var prefersStatusBarHidden: Bool {
return true
}
You have to set the "View controller-based status bar appearance" key to YES in your Info.plist too.
I think, childViewControllerForStatusBarStyle and childViewControllerForStatusBarHidden should be redefined so status bar can be changed in main view controller.