Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Subclass UINavigationController to override status bar style according to top view controller's preferred style
import UIKit
class CustomNavigationController: UINavigationController {
override var preferredStatusBarStyle: UIStatusBarStyle {
return topViewController?.preferredStatusBarStyle ?? .default
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.