How can I change the color of the UIAlertView
button title.
Actually, you can change the tint color of the view of the UIAlertController in iOS8.
UIAlertController *alertController = ....
[alertController.view setTintColor:[UIColor greenColor]];
You can't change alert views. If you really needed you can use custom ones.
The best way (And easiest) is the following:
alert = UIAlertController(title: "foo", message: "foo", preferredStyle: UIAlertControllerStyle.Alert)
alert.addAction.... foo
...foo
alert.view.backgroundColor = UIColor.orangeColor()
alert.view.tintColor = UIColor.orangeColor()
alert.view.layer.cornerRadius = 0.5 * alert.view.bounds.size.width
It gives also a plus effect of a "round faded orange circle" in the background.
Hope it helps
for Swift 3, use:
alertController.view.tintColor = UIColor.red
AFTER you present your alert controller
try this:
[[UIView appearance] setTintColor:[UIColor whiteColor]];
Can't customize the appearance of alert views.
For more info UIAlertView Class Reference:
The UIAlertView class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified.
For more info : How to change button text color of UIAlertView in iOS7?