【发布时间】:2014-10-19 07:37:07
【问题描述】:
我使用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];
这是正常行为还是我的代码有什么问题?
【问题讨论】:
-
它有效:),谢谢。添加您的答案,我会接受它
标签: ios ios8 uialertcontroller