I am trying to hide status bar in one of my UIViewControllers (Swift 4).
Firstly, I set View controller-based status bar appearance to
Need to write the code in the container view controller if it is a child view controller
override var prefersStatusBarHidden: Bool { return true }