I'm presenting a navigation controller with a view controller embedded in it and i want the status bar to be hidden. The good news is the status bar is hidden on simulator. But its not hidden when I test it on the actual iPhone. Here is my code.
let storyboard = UIStoryboard(name: "Login:SIgnUp", bundle: nil) if let vc = storyboard.instantiateViewController(withIdentifier: "Welcome") as? WelcomeVC { vc.modalPresentationCapturesStatusBarAppearance = true vc.modalPresentationStyle = .custom vc.modalTransitionStyle = .crossDissolve self.present(vc, animated: true, completion: nil) }