Skip to content

Instantly share code, notes, and snippets.

@Aehmlo
Created May 16, 2015 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aehmlo/0f0c8dd9fa5ef18bfa7f to your computer and use it in GitHub Desktop.
Save Aehmlo/0f0c8dd9fa5ef18bfa7f to your computer and use it in GitHub Desktop.
UINavigationController returns UIStatusBarStyle.Default for preferredStatusBarStyle by default, ignoring the visible view controller's return value for some reason. This fixes that.
internal class NavigationController: UINavigationController {
override func preferredStatusBarStyle() -> UIStatusBarStyle {
return visibleViewController.preferredStatusBarStyle()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment