【发布时间】:2016-06-18 08:46:49
【问题描述】:
我的代码:
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingImage image: UIImage, editingInfo: [String : AnyObject]?) {
self.image = image
self.imageStatusLabel.text = "There is a picture"
self.imageStatusLabel.textColor = UIColor.blue()
picker.dismiss(animated: true, completion: nil)
}
这是错误:
无法覆盖已标记为不可用的“imagePickerController”:在 iOS 7 及更早版本中弃用的 API 在 Swift 中不可用
好吧,我已经尝试使用更新的功能:
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
// But no image in the parameters
}
但是,参数中没有图像,我可以获取图像。
我该怎么办?
【问题讨论】:
标签: xcode swift uiimagepickercontroller swift3 xcode8