Change global tint color - iOS7/iOS8
Simply change the UIWindow
's tintColor
in your application delegate, it's automatically passed as default to all its UIView
descendants.
[self.window setTintColor:[UIColor greenColor]];
There are two ways to change your global tint color. As many mentioned above you could change self.window.tintColor
in -application:didFinishLaunchingWithOptions:
.
More elegant way, in my opinion, is to set Global Tint in File Inspector in your Storyboard while nothing is selected. This way your -application:didFinishLaunchingWithOptions:
is cleaner.
You can specify a tint color for the entire app by setting the window’s tint property. To do this, you could use code similar to the following:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window.tintColor = [UIColor purpleColor];
return YES;
}
[[UIView appearance] setTintColor:[UIColor greenColor]];