title: How to hide status bar in swift 5?
body: <p>When I scroll, navigation bar and Status Bar hide
  And it works well
  But when I go to another page and go back to the first page, navigation bar goes into hiding, but the status bar will not be hidden again.
  i want to hide status bar when i scroll . such as navigation bar </p>
  
  <p>this is my code :</p>
  
  <pre><code>class ViewController: UIViewController {
  @IBOutlet weak var View_Mor: UIView!
  override func viewDidLoad() {
      super.viewDidLoad()
      navigationController?.hidesBarsOnSwipe = true
  }
  override var prefersStatusBarHidden : Bool {
      if self.navigationController?.isNavigationBarHidden == true {
          return true
      } else {
          return false
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>@IBAction func gotosecondvc(_ sender: UIBarButtonItem) {
      let st = UIStoryboard(name: "Main", bundle: nil)
      let vc = st.instantiateViewController(withIdentifier: "secondvc")
      vc.modalPresentationStyle = .overFullScreen
      present(vc,animated: true,completion: nil)
      }
  </code></pre>