Amr Mohamed
Amr Mohamed

Reputation: 2380

How to change Status Bar (Style / Color) of UISplitViewController iOS 8

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 ?

Upvotes: 5

Views: 2195

Answers (1)

Petr Syrov
Petr Syrov

Reputation: 15323

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
    }

}

Upvotes: 11

Related Questions