HOW TO CHANGE TITLE COLOR OF A UIVIEWCONTROLLER IN OBJECTIVE-C?

Mikki Halpin

Total Post:23

Points:161
Posted by  Mikki Halpin
 947  View(s)
Ratings:
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.

  1. Tarun Kumar

    Post:214

    Points:1642
    Re: How to change title color of a UIViewController in Objective-C?

    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

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!