uinavigationcontroller - Change color of translucent black UINavigationBar -


i stumbled upon many times, never found solution. uinavigationcontroller's navigationbar can set black translucent like:

self.navigationcontroller.navigationbar.barstyle=uibarstyleblacktranslucent; 

also, there translucent property in uinavigationbar, docs say:

when yes, navigation bar drawn partial opacity, regardless of bar style. amount of opacity fixed , cannot changed. permissible set value of property when navigation bar being managed navigation controller object.

i tried

self.navigationcontroller.navigationbar.tintcolor=[uicolor bluecolor]; self.navigationcontroller.navigationbar.translucent=yes; 

and thousand variations: setting translucent property first, setting in appdelegate , in viewcontroller, setting barstyle first. result same: no transparency. hence question:

is possible change color of translucent uinavigationbar different black (preferably within uinavigationcontroller)?.

i hope there review-safe solution.

thanks, m

once know it, it's simple:

self.navigationcontroller.navigationbar.tintcolor = [uicolor bluecolor]; self.navigationcontroller.navigationbar.alpha = 0.7f; self.navigationcontroller.navigationbar.translucent = yes; 

the translucent property seems determine wether main view should visible under navigation bar, , resizes view appropiately.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -