相关疑难解决方法(0)

在UIAlertController中将图像添加到UIAlertAction

我已经看过UIAlertControllers的几个屏幕截图,在行的左边有一个图像,但我没有在文档中看到它.视觉的一个例子是http://imgur.com/SISBvjB 这是我现在为我的控制器提供的代码:

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];
Run Code Online (Sandbox Code Playgroud)

ios uialertcontroller

52
推荐指数
5
解决办法
5万
查看次数

Xcode Swift如何将图像添加到UIAlertController选项?

我想添加图像/图标来UIAlertController喜欢苹果音乐播放器中的对话框

我想要的是彩色/大尺寸图像/图标,如下面的图像,而不是这个问题中的一个。我相信它的ios 11+功能,但是我找不到它的文档。

完全像这样:

在此处输入图片说明

我可以这样做UIAlertController还是应该创建自己的自定义对话框uiviewcontroller

xcode swift uialertcontroller

2
推荐指数
1
解决办法
2372
查看次数

标签 统计

uialertcontroller ×2

ios ×1

swift ×1

xcode ×1