Skip to content

Instantly share code, notes, and snippets.

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