iOS 8:UIAlertController默认样式颜色

iOS 8:UIAlertController默认样式颜色,ios,ios8,uialertcontroller,Ios,Ios8,Uialertcontroller,我使用的默认样式是UIAlertController和UIAlertAction,但我得到的是白色背景上的白色文本,如屏幕截图所示 这是我的密码: UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet]; UIAlertAction* defaultAction = [UIAler

我使用的默认样式是
UIAlertController
UIAlertAction
,但我得到的是白色背景上的白色文本,如屏幕截图所示

这是我的密码:

UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"0237826726" style:UIAlertActionStyleDefault
                                                              handler:^(UIAlertAction * action) {
                                                                    [self callPlaceNumber:@"0237826726"];
                                                              }];
[alert addAction:defaultAction];

UIAlertAction* cancel = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleDefault
                                                   handler:^(UIAlertAction * action) {
                                                       [alert dismissViewControllerAnimated:YES completion:nil];
                                                   }];

[alert addAction:cancel];
[self presentViewController:alert animated:YES completion:nil];
我搜索了这个问题,发现我可以为
UIAlertController
添加
tintColor
,如下所示,但它不起作用

alert.view.tintColor = [UIColor blackColor];

这是正常行为还是我的代码中有任何错误?

可以通过外观API设置UIAlertController的色调:

[[UIView appearanceWhenContainedIn:[UIAlertController class], nil] setTintColor:[UIColor blackColor]];

检查此项是否有效:),谢谢。加上你的答案,我就接受了it@AndreaZ你好我已成功更改UIAlertAction中添加的附件视图的色调,但仍然无法将UIAlertAction按钮标题的文本从白色更改为所需的文本。还有什么要补充的吗?