Zeba Rahman
Mar 25 · 1 min read

The text on the status bar in iOS apps are black-colored by default.

If your app theme has a dark navigation style, you would prefer white text on the status bar.

If you have created your ViewControllers using Storyboard, open the embedding Navigation Controller, and select the Navigation Bar item.

Under attributes inspector, set the style as Black.

That’s it!

If this doesn’t work, here’s how to change the style programmatically

override var preferredStatusBarStyle: UIStatusBarStyle {
return .lightContent
}

override func viewDidAppear(_ animated: Bool) {
navigationController?.navigationBar.barStyle = .black
}

Originally published at Fabcoding.

fabcoding

app & web development tutorials & tips

Zeba Rahman

Written by

App Developer | fabcoding.com

fabcoding

fabcoding

app & web development tutorials & tips

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade