5

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]];
Akhilesh Sharma
  • 1,580
  • 1
  • 17
  • 29
  • whatever the content that is behind the alert view, it will be shown on alert view, it is the tansparency of the alert that gives you the impression of tint color!!! – Teja Nandamuri Sep 24 '15 at 13:43
  • You can change the tint,backgroundColor,alpha properties for alertcontroller . What else do you need – Teja Nandamuri Sep 24 '15 at 13:51
  • @Mr.T I do understand that but there is no way I have found yet to override tint color as of now in iOS9. And also this behavior is for UIAlertController only – Akhilesh Sharma Sep 24 '15 at 13:52
  • It appears to be a regression in ios 9 - https://openradar.appspot.com/22209332 - i had tintColor working perfectly in iOS8 – CVertex Oct 23 '15 at 00:44

2 Answers2

2

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

redead
  • 360
  • 3
  • 16
0

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

Community
  • 1
  • 1
guidev
  • 2,695
  • 2
  • 23
  • 44