Masterminder
Masterminder

Reputation: 1135

How to change the color of the navigation bar for the iOS 5 platform?

I am having some trouble changing the background of the navigation bar for the iOS 5 platform in XCode 4.3.2 . I prefer to not set the background as an image. Can someone post how to do this and how to change it for the whole app? I want to change it to a light blue color.

Thx

Upvotes: 0

Views: 1476

Answers (3)

jrturton
jrturton

Reputation: 119242

In application:DidFinishLaunchingWithOptions: in your application delegate, add the following:

[[UINavigationBar appearance] setTintColor:[UIColor blueColor]]; 

Substitute your favourite colour. See documentation for more things you can adjust. This changes the appearance of all navigation bars in your application.

Upvotes: 1

fBourgeois
fBourgeois

Reputation: 326

You could use the tintColor property.

Upvotes: 0

Scott Berrevoets
Scott Berrevoets

Reputation: 16946

Look at iOS 5's UIAppearance protocol. It's iOS 5 only, but gives you a very good way of customizing a lot of UIKit elements.

Upvotes: 0

Related Questions