Nir*_*ari 1 xcode ios swift uialertcontroller
我正在尝试在 iOS 应用程序的操作表中添加图标。我在AppStore的action sheet中看到apple已经实现了这样的行为,但是没有提供任何回调方法来实现它?
关于如何在 iOS 12 Swift 4.x Xcode10.x 上实现它的任何建议?
您可以UIAlertAction使用image键添加图像:
let image = UIImage(named: "IMAGE_NAME")
var alertAction = UIAlertAction(title: "TITLE", style: .default, handler: nil)
alertAction.setValue(image, forKey: "image")
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2753 次 |
| 最近记录: |