Navigation Bar Button Item Tint
If you want to keep the original colors of the image, you have to do it in code:
[button setImage:[[UIImage imageNamed:@"imageName.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
If you want to overwrite the tint color of your button (e.g.: orange only) you can achieve that inside your storyboard. Just set the tint
color of your Bar Button Item
inside Xcode's Attributes Inspector
to the desired color:
Here's lootsch's (excellent) answer converted to Swift 3 / Swift 4:
barButton.image = UIImage(named: "imageName")?.withRenderingMode(.alwaysOriginal)
To keep the original colours of the image, you would have to assign the image to the button from code rather than from your storyboard.
- Reference your Button Outlet in your class file (usually a ViewController)
Assign the image to the button from code:
[self.bbiHome setImage:[[UIImage imageNamed:@"icon.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];