5

i am trying to change the status Bar Style of UISplitViewController

i used to do that with UINavigationBar

UINavigationBar.appearance().barStyle = UIBarStyle.Black

but the UISplitViewController does not have an appearance property

is there anyway to change that Style ?

Amr Mohamed
  • 2,290
  • 4
  • 20
  • 39

1 Answers1

11

View controller-based status bar appearance is set to YES by default. So you just have to subclass your split controller like

class SplitViewController: UISplitViewController {

    override func preferredStatusBarStyle() -> UIStatusBarStyle {
        return UIStatusBarStyle.BlackOpaque
    }

}
Petr Syrov
  • 14,689
  • 3
  • 20
  • 30