objective c - StatusBarStyle not working as expected on iOS 9 -
i trying following statusbarstyle on swift app :
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 :
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 :
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 :
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
in appdelegate use:
uinavigationbar.appearance().bartintcolor = uicolor.redcolor() uinavigationbar.appearance().translucent = false obviously can use uicolor want...





Comments
Post a Comment