I am using new UIAlertController for showing alerts. I have this code:
// nil titles break alert interface on iOS 8.0, so we\'ll be using empty strings
UIAle
Solution/Hack for iOS9
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Test Error" message:@"This is a test" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
NSLog(@"Alert View Displayed");
[[[[UIApplication sharedApplication] delegate] window] setTintColor:[UIColor whiteColor]];
}];
[alertController addAction:cancelAction];
[[[[UIApplication sharedApplication] delegate] window] setTintColor:[UIColor blackColor]];
[self presentViewController:alertController animated:YES completion:^{
NSLog(@"View Controller Displayed");
}];