Override the following properties in the UINavigationController subclass:

override var childForStatusBarStyle: UIViewController? { return topViewController }

To hide the status bar, override the following properties:

override var childForStatusBarHidden: UIViewController? { return topViewController }

Then override the following properties on the page where the status bar style needs to be modified:

override var preferredStatusBarStyle: UIStatusBarStyle {# if available (iOS 13.0, *) { return .darkContent } else { // Fallback on earlier versions return .default } }