1

I have a TabBarController Connected to > NavigationController > TableViewController and i would like to change the tintColor just of a specific page/barButtonItem (not all tab bar buttons) .As you know Runtime Attribute isn't working anymore in Xcode8.

I have looked across the web and tried different solutions but couldn't make it to work out so please help.

thank you

  • 1
    Possible duplicate of [Change only one specific UITabBarItem tint color](http://stackoverflow.com/questions/24918215/change-only-one-specific-uitabbaritem-tint-color) – Sasha Kozachuk Dec 04 '16 at 10:20

1 Answers1

2

Here's an example written in Swift 3:

let barButtonItem = UIBarButtonItem(image: UIImage(named: "image_path"), style: UIBarButtonItemStyle.done, target: self, action: #selector(ViewController.didTapBarButtonItem))
barButtonItem.tintColor = YOUR_COLOR_HERE
navigationItem.rightBarButtonItem = barButtonItem

You place this in the viewDidLoad method of your view controller.

Paul Razvan Berg
  • 16,949
  • 9
  • 76
  • 114