Swift
Sie UIAlertActionStyle.Destructive
für Schaltfläche Textfarbe in rot
let alert = UIAlertController(
title: "Basic Alert style",
message: "Basic Alert With Buttons",
preferredStyle: UIAlertControllerStyle.Alert)
let Reset = UIAlertAction(
title: "Reset",
style: UIAlertActionStyle.Destructive) { (action) in
// do your stuff
}
let Cancel = UIAlertAction(
title: "Cancel", style: UIAlertActionStyle.Default) { (action) in
// do your stuff
}
alert.addAction(Reset)
alert.addAction(Cancel)
presentViewController(alert, animated: true, completion: nil)
Objective-C
UIAlertController *alert = [UIAlertController
alertControllerWithTitle:@"Basic Alert style"
message:@"Basic Alert With Buttons"
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *Reset = [UIAlertAction
actionWithTitle:NSLocalizedString(@"Reset", @"Reset action")
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction *action)
{
NSLog(@"Reset action");
}];
UIAlertAction *Cancel = [UIAlertAction
actionWithTitle:NSLocalizedString(@"Cancel", @"Cancel action")
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action)
{
NSLog(@"Cancel action");
}];
[alert addAction:Reset];
[alert addAction:Cancel];
[self presentViewController:alert animated:YES completion:nil];
Ausgang verwenden müssen

für weitere Informationen this
Das ist, was ich brauchte, danke. –