Skip to content

Instantly share code, notes, and snippets.

@asobolevsky
Created June 13, 2019 09:05
Show Gist options
  • Save asobolevsky/a8100d91fdb8a2623e074eef1c693a51 to your computer and use it in GitHub Desktop.
Save asobolevsky/a8100d91fdb8a2623e074eef1c693a51 to your computer and use it in GitHub Desktop.
extension UINavigationController {
override open var childForStatusBarStyle: UIViewController? {
return topViewController
}
}
extension UITabBarController {
override open var childForStatusBarStyle: UIViewController? {
return selectedViewController
}
}
extension UISplitViewController {
override open var childForStatusBarStyle: UIViewController? {
return viewControllers.first
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment