How programatically change global Tint Colour of your iOS App in Xcode project. i.e. Changing all UIBarButtonItems tint colour at once

You may be wondering how to programatically change global Tint Colour of your iOS App in Xcode project. i.e. Changing all UIBarButtonItems tint colour at once

 
Without selecting every single button & changing tint for every single one & for button added there after.

 
Here is solution as simple as single line of code will remove hassle from your mind & even you can re-change global tint colour again with changing few letters

 
Solution:

 
In you iOS App’s Xcode projects AppDelegate.m under function ‘didFinishLaunchingWithOptions’ add below line

 

self.window.tintColor = [UIColor brownColor];

 
Above code will change global tint colour to brown,

 
if write black instead brown global tint colour will change to black

 

self.window.tintColor = [UIColor blackColor];

 
& if change it to red it will change global tint colour to red it is as simple as that

 

self.window.tintColor = [UIColor redColor];

 
Your ‘didFinishLaunchingWithOptions’ function will look like this:

 

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.
    self.window.tintColor = [UIColor brownColor];
    
    return YES;
}

 
Hope you find this useful,

 
Thanks & Regards
Mandar Apte

Published by Mandar Apte

Mandar is a Mumbai-based multi-disciplinary designer with UX/UI, Logo, Symbol, and Brand Identity design expertise. He currently runs his Mudrkashar Linguistic Apple iPhone, iPad, and Mac app business in the heart of Mumbai city.

Join the Conversation

2 Comments

  1. This is not working for me. When the app launches, I want all the tab bar icons to be white. My tab bar colour is purple, which I have done, But only the selected is white, unselected are gray. Please help

  2. This is not working for me. When the app launches, I want all the tab bar icons to be white. My tab bar colour is purple, which I have done, But only the selected icon is white, unselected icons are gray. Please help

Leave a comment

Leave a Reply

%d