objective c - StatusBarStyle not working as expected on iOS 9 -


i trying following statusbarstyle on swift app :

enter image description here

my appdelegate uses uinavigationcontroller follows

self.nav = uinavigationcontroller(rootviewcontroller: controller!) 

so tried set uibarstyle black follows :

    self.nav?.navigationbar.barstyle = uibarstyle.black 

however, results in following :

enter image description here

btw, on info.plist, have following set

<key>uistatusbarstyle</key> <string>uistatusbarstyledefault</string> <key>uiviewcontrollerbasedstatusbarappearance</key> <false/> 

and settings result in desired statusbar style on launchscreen not on other screens.

i tried adding following method vcs inside uinavigationcontroller

override func preferredstatusbarstyle() -> uistatusbarstyle {     return uistatusbarstyle.default } 

but results in following status bar style :

enter image description here

what best way have desired status bar style in case have uinavigationcontroller on ios 9?

additionally, if remove plist entry , set

 self.nav?.navigationbar.barstyle = uibarstyle.black  

in appdelegate, following result :

white_text_on_gray_background_status_bar_style

additionally, removed places backgroundcolor being set except following in appdelegate (colorone deepblue color want on status bar)

self.window?.backgroundcolor = colorone 

and when did this, light blue color on status bar, closest color deep blue color need on status bar seen here

black_text_on_light_blue_status_bar

in appdelegate use:

  uinavigationbar.appearance().bartintcolor = uicolor.redcolor()   uinavigationbar.appearance().translucent = false 

obviously can use uicolor want...


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -