I had been using following code to change text color of items which I add in UIActionSheet
.:
- (void)willPresentActionSheet:(UIActionSheet *)act
For iOS 7 backwards compatibility, and to collect the proper default tint colour (that Apple may well change in future versions), I use this. Thanks to the answers about default tint and to Lucas's answer above.
const Class alertControllerClass = NSClassFromString(@"UIAlertController");
if(alertControllerClass)
{
UIColor *defaultTintColour = UIView.new.tintColor;
[[UIView appearanceWhenContainedIn: alertControllerClass, nil] setTintColor: defaultTintColour];
}
Caution though – you need to ensure that you use this before you start setting the global tint otherwise the UIView.new.tintColor
will just give you the current tint you have set up.