Navigation bar becomes transparent when set to translucent

I’m using XCode 5.02 and iOS7 SDK.

I’m trying to set my navigation bars as translucent but when I do that, they become completely transparent instead. The status bar will also be transparent. I can see the title and buttons on the navigation bar but no background. The same happens in all view controllers in my project, so this is not bound to specific view. When I set translucent = NO, I get solid colors.

  • Simple Sprite Kit Scene setup going wrong
  • How to get UIViewController of a UIView's superView in iPhone SDK?
  • why does this code use presentModalViewController? (not pushViewController)
  • Value of type 'UIViewController' has no member 'varView'
  • access view inside a storyboard
  • Child View Controller rotation methods not being called
  • This is both in the simulator and on a device running iOS7.

    I have tried setting translucent to ON in the .plist file and also tried setting it directly in code like this in viewDidLoad and viewWillAppear:

    self.navigationController.navigationBar.translucent = YES
    

    Any ideas appreciated.

    Thank you.

    2 Solutions Collect From Internet About “Navigation bar becomes transparent when set to translucent”

    I had the same problem setting my navigation bars as translucent but when I do that, they become completely transparent instead
    Try this:
    select Use Autolayout option in file inspector.this may solve your problem too.

    Did you try the option to select Translucent Navigation Bar in the Attributes inspector ?

    with your View Controller selected, click on Attributes inspector and from there,
    you may select the respective type of Top Bar that suits you from a drop down list.

    here is a screenshot:

    enter image description here