tags:

views:

123

answers:

2

Hi guys,

I think I must be going nuts here. I have a UINavigationController and in every view that I have pushed I have selected Black Navigation Bars in IB, but they all turn up as translucent ones.

What have I done wrong?

Thanks

+3  A: 

Is the translucent property on the UINavigationBar set properly?

Check your code to see if translucent is set somewhere or add this to your VC to print out the value:

NSLog(@"navBar.translucent = %d",
      (int)navController.navigationBar.translucent);

And check the Navigation Controller in IB, the Navigation Bar section should have a Style of Black Opaque (not Black Translucent), and an Alpha of 1.00.

Nav Bar in IB

progrmr
In IB I have selected Top Bar: Black Navigation Bar
willcodejavaforfood
No, not Top Bar under Simulated User Interface elements, you need to set the "Style" under "Navigation Bar" in "Navigation Bar Attributes". Simulated User Interface elements are just place holders to help with your layout, they don't do anything.
progrmr
OK that makes sense. This looks promising!
willcodejavaforfood
A: 

Are you sure you are not re-declaring the color of the bar in code somewhere?

Louie
Yes I'm sure that I don't set it specifically to Translucent. I'm not sure however if this can be 'inherited' from somewhere else higher up in the hiearchy.
willcodejavaforfood