I want my statusbar to carry the color on from the navigation bar so there is no colour band as shown below. Is this done by setting a specific status bar background color or via resizing/options on the navigation bar?
Asked
Active
Viewed 541 times
0
-
You can't set the color of the status bar. It is just transparent and shows the code under it. unless you unset `under top bars` for the view controller. – TheValyreanGroup Nov 19 '16 at 22:15
-
ah ok, but then how can i get the header bar under it without the date clipping the title? – infernouk Nov 19 '16 at 22:19
-
I'm not sure you can when using a nav controller and the bar. I've only ever done it without the nav bar and I create my own custom navigation. – TheValyreanGroup Nov 19 '16 at 22:32
-
check my answer http://stackoverflow.com/questions/40563395/same-color-for-statusbar-and-navigationbar-ios/40564347#40564347 – Joe Nov 20 '16 at 00:37
1 Answers
0
Status bar color automatically set according to our navigation bar. On the other hand,you can set the status bar content color. Which we choose as per its background. Suppose if you have dark background then you can choose light content.
i.e: UIApplication.shared.statusBarStyle = .lightContent
Similarly for the light background, you can choose default property. i.e:
UIApplication.shared.statusBarStyle = .default

Amanpreet
- 1,301
- 3
- 12
- 29