2

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.

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.

  • I've tried your case on simple example (ios7 simulator) of navbar controller. There is no problem that you describe. NavBar becomes really translucent! – malex Jan 17 '14 at 09:13
  • Yes true, there seems to be something wrong with my storyboard or project, I just don't know what. I did try to copy my controllers to a new storyboard but that did not solve the problem. – Bragi Fannar Sigurðsson Jan 17 '14 at 09:25
  • Hate storyboard/IB because of many hidden unevident settings :) – malex Jan 17 '14 at 09:28

2 Answers2

0

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.

Anand
  • 22
  • 2
-1

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

GoGreen
  • 2,251
  • 1
  • 17
  • 29