Setting UINavigationbar properties in viewDidLoad does nothing

I have tried setting the UINavigationbar style to be a semi-transparent style in my controller's viewDidLoad method. But nothing has changed. Why?

I am setting the property using standard code like

self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;

      

+2


source to share


3 answers


According to Apple Documentation :



UIBarStyleBlackTranslucent is deprecated. Use UIBarStyleBlack and set the semi-transparent property to YES.

+4


source


just had the same problem - apple doc is a bit vague - here's the solution

navigationController.navigationBar.barStyle = UIBarStyleBlack;



navigationContoller.navigationBar.translucent = YES;

+1


source


UIBarStyleBlackTranslucent
Deprecated. Use UIBarStyleBlack and set the translucent property to YES instead.
Available in iPhone OS 2.0 and later.
Declared in UIInterface.h.

      

0


source







All Articles