In a ViewController, which I presented modally, I did this:
override func prefersStatusBarHidden() -> Bool { return true }
This used
Use this code:
override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) UIApplication.shared.isStatusBarHidden = true }
if this code doesn't work, you need to add this key in the info.plist
View controller-based status bar appearance - NO