如何在UIAlertController的第一个动作中添加tableview的截图?我试着那样做
let actionSheet = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
let action = UIAlertAction(title: NSLocalizedString("Share routine", comment: ""), style: .default, handler: { _ in
})
action.setValue(image, forKey: "image")
actionSheet.addAction(action)
actionSheet.addAction(UIAlertAction(title: NSLocalizedString("Cancel", comment: ""), style: .cancel, handler: nil))
UIApplication.topViewController()?.present(actionSheet, animated: true, completion: nil)发布于 2018-07-18 20:20:50
action.setValue(myImage.withRenderingMode(.alwaysOriginal), forKey: "image")我需要添加.withRenderingMode(.alwaysOriginal) <-这是正确的形象。感谢所有人的帮助
https://stackoverflow.com/questions/51401552
复制相似问题