【发布时间】:2014-12-08 10:29:01
【问题描述】:
我在行的左侧看到了几个 UIAlertControllers 的屏幕截图,但我在文档中没有看到它。一个示例视觉是 这是我现在的控制器代码:
UIAlertController * view = [UIAlertController
alertControllerWithTitle:@"My Title"
message:@"Select you Choice"
preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction* ok = [UIAlertAction
actionWithTitle:@"OK"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
}];
[view addAction:ok];
[self presentViewController:view animated:YES completion:nil];
【问题讨论】:
-
没有 API 可以自定义
UIAlertController的按钮。你看到的任何截图都没有使用UIAlertController。 -
也许我误解了 OP,但我认为他不想自定义警报按钮,而是在警报中添加图像。
-
这就是我要创建的imgur.com/SISBvjB
-
@user1079052 您应该接受 JP 的回答作为正确答案。它绝对是 SO 上最好的一个
标签: ios uialertcontroller