相关疑难解决方法(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万
查看次数

像在UIDocumentInteractionController中一样将图像添加到UIActionSheet按钮

是否可以将图像添加到UIActionSheet所见的按钮UIDocumentInteractionController?如果是这样,请告诉我它是如何完成的.

iphone objective-c uiimage uiactionsheet uidocumentinteraction

33
推荐指数
4
解决办法
4万
查看次数

在swift中将图像添加到UIAlertController中

我想要一个带有图像的简单UIAlertController.我该怎么办?

let alertMessage = UIAlertController(title: "Service Unavailable", message: "Please retry later", preferredStyle: .Alert)
                alertMessage.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil))
                self.presentViewController(alertMessage, animated: true, completion: nil)
Run Code Online (Sandbox Code Playgroud)

image swift uialertcontroller

3
推荐指数
1
解决办法
8046
查看次数