ios - Navigation Bar change color when running -


when switch screen, navigation bar (white) turns gray (if put color took darker shade of same color)

this code choose color

self.navigationcontroller!.navigationbar.bartintcolor = uicolor.whitecolor() self.navigationcontroller!.navigationbar.titletextattributes = [nsforegroundcolorattributename: uicolor.blackcolor()] self.navigationcontroller!.navigationbar.translucent = false 

any idea prevent happening , keep color want


try below, surely works.

self.navigationcontroller!.navigationbar.translucent = false;  self.navigationcontroller!.navigationbar.bartintcolor = uicolor.whitecolor() self.navigationcontroller!.navigationbar.titletextattributes = [nsforegroundcolorattributename: uicolor.blackcolor()] 

while going other screen navigation bar turns gray because, on ios7 , later, translucent property of uinavigationbar true default.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -