I am trying to hide status bar in one of my UIViewControllers (Swift 4).
Firstly, I set View controller-based status bar appearance to
Use the following code UIApplication.shared.isStatusBarHidden = true
UIApplication.shared.isStatusBarHidden = true
this is the only thing that I found that is working in iOS11. you can write in didFinishLaunchingWithOptions or in 'viewWillAppear' of you BaseViewController Enjoy.
didFinishLaunchingWithOptions
BaseViewController