Home > DeveloperSection > Forums > How to change title color of a UIViewController in Objective-C?
Mikki Halpin
Mikki Halpin

Total Post:23

Posted on    February-15-2016 10:10 PM

 iPhone iPhone  Ios  Objective C 

 1 Reply(s)
 895  View(s)
Rate this:

I have created a table view controller which has some elements. and I have also created a view controller which will come-out whenever we press any row of table view.

Now, I want to change title color of view controller when ever it pushed onto the stack.

Please give me any suggestion. Thanks.

Tarun Kumar

Total Post:214

Posted on    February-15-2016 11:45 PM

To set the title color of View Controller after push. set the tintColor property of Navigation Bar.
Use this code:

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

and you can set tintcolor globally using code like this:

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

I hope the above suggestion will be helpful for you.

Modified On Feb-15-2016 11:45:37 PM

Don't want to miss updates? Please click the below button!

Follow MindStick