Akhilesh Sharma
Akhilesh Sharma

Reputation: 1628

Change tint color UIAlertController iOS9

I am not sure that anyone has encountered such kind of a behavior or not but iOS9 is making my UIAlertController tint to inherit from the main window. Is there any specific way something like UIAppearance that can help and resolve the issue.

[[UICollectionViewCell appearanceWhenContainedIn:[UIAlertController class], nil] setTintColor:[UIColor colorWithRed:0 green:0 blue:0 alpha:1]];

Upvotes: 5

Views: 551

Answers (2)

guidev
guidev

Reputation: 2885

Due to a known bug introduced in iOS 9 (https://openradar.appspot.com/22209332), the tintColor is overridden by the application window's tintColor.

See my full answer here:

https://stackoverflow.com/a/37737212/1781087

Upvotes: 0

redead
redead

Reputation: 380

Have you set the UIWindow color in the AppDelegate like

func application(application: UIApplication, didFinishLaunchingWithOptionslaunchOptions: [NSObject: AnyObject]?) -> Bool
{
    window?.tintColor = .redColor()
}

At least this worked for me

enter image description here

Upvotes: 2

Related Questions