Matt Dawdy
Matt Dawdy

Reputation: 19707

Change the color of a Tabbar on the iPhone

Our designers want to change the color of the default UITabBar. Of course they do.

They want the background to be green, and the icon highlights to be white, as opposed to the black/blue default color scheme.

Anyone have any experience or suggestions to do this?

Upvotes: 2

Views: 28800

Answers (7)

Muhammad Rizwan
Muhammad Rizwan

Reputation: 3480

I have try this one and its working for me!!!

[self.TabBarController.tabBar setTintColor:[UIColor colorWithRed:0.1294 green:0.5686 blue:0.8353 alpha:1.0]];


[self.TabBarController.tabBar setTintColor:[UIColor "YOUR COLOR"];

Hope it'll help you also!!!

Upvotes: 2

anka
anka

Reputation: 3857

Since iOS5 is released, you can now use the property tintColor. i.e.:

tabBar.tintColor = [UIColor greenColor];

Upvotes: 8

Ethan Allen
Ethan Allen

Reputation: 14835

iOS 5.0 fixes this issue but the solution is under NDA. Look up UITabBar in your documentation for an EASY way to do what you want to do.

Upvotes: 1

oberbaum
oberbaum

Reputation: 2448

Theres a useful link here: http://duivesteyn.net/2010/01/16/iphone-custom-tabbar-background-image/

Upvotes: 0

rpetrich
rpetrich

Reputation: 32316

This can be done with a little private API hacking.

Upvotes: -1

Marc W
Marc W

Reputation: 19241

Be careful. If your app is going for submission to the app store, Apple may reject it if you're modifying their prescribed color scheme.

Upvotes: 0

JWD
JWD

Reputation: 12218

You have to subclass the UITabBarController and implement custom drawing.

Check out this SO question. Changing Tint / Background color of UITabBar

Upvotes: 9

Related Questions