0

With my app and iOS 7, I want to have a green background for the navigation bar.

From what I see, I have two options: set the background color directly with a UIColor corresponding to green. This causes the green to be very washed out, but it does cause it to be transparent and blurred.

The other option I figured is to create a green background image that you manually set transparent yourself, then set this image as the nav's background image. This works 95%, but the background is not blurred. It does keep the right color and make it transparent however.

What is the correct way to do this? For instance, the new Facebook app for iOS 7 accomplishes this beautifully with their blue.

Doug Smith
  • 29,668
  • 57
  • 204
  • 388

1 Answers1

0

Is this the effect you're looking for?

enter image description here

I did this using the bar's tint color:

[[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:0.0f green:0.4f blue:0.0f alpha:1.0f]];

Of course, you could also use a navigation bar instance directly instead of using the appearance proxy.

Greg
  • 33,450
  • 15
  • 93
  • 100
  • 1
    I meant more so something like this: http://i.imgur.com/uS9oTOM.png I find in that screenshot the color looks a little faded. – Doug Smith Sep 20 '13 at 21:12