Home Tutorial Iphone Examples UINavigationBar Color - iPhone example

 
 

Share on Google+Share on Google+
UINavigationBar Color - iPhone example
Posted on: April 20, 2010 at 12:00 AM
Advertisement
The example is discussing about how to change the color of UINavigationBar. In iPhone applications you can customize the UINavigationBar and change their color either programmatically or by Interface builder. This term is also know as "UINavigationbar tintcolor".

UINavigationBar Color - iPhone example

The example is discussing about how to change the color of UINavigationBar. In iPhone applications you can customize the UINavigationBar and change their color either programmatically or by Interface builder. This term is also know as "UINavigationbar tintcolor".

"tintColor" - tintColor is basically available for UINavigationBar that is used to set diverse color to Navigation bar. you can write it as "setTintColor". It takes 'nil' as a default value.

To test it, Just create a navigation based application and just add the following code into your implementation file. It will add the desired color to the UINavaigationBar.

- (void)viewWillAppear:(BOOL)animated {

[super viewWillAppear:animated];
[self.navigationController.navigationBar setTintColor:[UIColor blackColor]];

}

On "Build" it should look like the given image..

In the example, we have assigned the black color to the UINavigationBar. You can choose any color that meets your iPhone project requirement.

Download Code

Advertisement

Related Tags for UINavigationBar Color - iPhone example:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: April 20, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com