相关疑难解决方法(0)

UIAlertController - 向操作表添加自定义视图

当我们尝试在屏幕截图中附加图像时,我正在尝试制作在iOS上的消息应用中显示的操作表.

我意识到在新的UIAlertController中,我们无法适应任何自定义视图.我有什么方法可以做到这一点?

我的代码看起来很标准.

    let alertController = UIAlertController(title: "My AlertController", message: "tryna show some images here man", preferredStyle: UIAlertControllerStyle.ActionSheet)

        let okAction = UIAlertAction(title: "oks", style: .Default) { (action: UIAlertAction) -> Void in
        alertController.dismissViewControllerAnimated(true, completion: nil)
    }
    let cancelAction = UIAlertAction(title: "Screw it!", style: .Cancel) { (action: UIAlertAction) -> Void in
        alertController.dismissViewControllerAnimated(true, completion: nil)
    }

    alertController.addAction(okAction)
    alertController.addAction(cancelAction)

    self.presentViewController(alertController, animated: true, completion: nil)
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

swift uialertcontroller ios9

41
推荐指数
3
解决办法
6万
查看次数

如何自定义UIActionSheet?iOS版

是否可以创建一个ActionSheet在这个图像之间的两个按钮之间有标签的?

在此输入图像描述

现在真的需要这个.谁能帮我?谢谢.

objective-c uiactionsheet

19
推荐指数
2
解决办法
3万
查看次数