Ashish K Agarwal
Ashish K Agarwal

Reputation: 1172

Change the color & background of title in iPhone view

i have a tab bar controller as a root controller. In its first tab I have a navigation controller containing an ungrouped table view

Screenshot is at - http://sankalplabs.files.wordpress.com/2011/04/screen-shot-2011-04-05-at-11-17-10-am.png

(Since I am new to this forum, its not allowing me to upload the image)

Now i want to change the color & background of the title "Smart Analytics". I tried using a label & placing it on the title. But it has not worked. What is the way to do this ?

Upvotes: 0

Views: 6793

Answers (3)

Dipak Narigara
Dipak Narigara

Reputation: 1806

use this

self.navigationController.navigationBar.tintColor = [UIColor greenColor];

Upvotes: 0

Jhaliya - Praveen Sharma
Jhaliya - Praveen Sharma

Reputation: 31722

Try with titleView property of UINavigationItem

@property(nonatomic, retain) UIView *titleView

Can be accessed like below In UIViewController inherited class.

self.navigationItem.titleView = myOwnLabel;

Related SO post

Changing the Title View of a UINavigationController UIViewController in Interface Builder

Upvotes: 0

reflog
reflog

Reputation: 7645

self.navigationController.tintColor = [UIColor greenColor];

Upvotes: 2

Related Questions