【发布时间】:2019-01-12 06:41:19
【问题描述】:
我正在尝试从相机或图库中选择图像,并在我的图像视图中将所选图像显示到屏幕上。但它没有显示。
func imagePickerController(_ picker: UIImagePickerController,
didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
guard let selectedImage = info[.originalImage] as? UIImage else {
fatalError("Expected a dictionary containing an image, but was provided the following: \(info)")
}
imageview.image = selectedImage
dismiss(animated: true, completion: nil)
}
我错过了什么?
就我而言,断点函数根本没有调用
【问题讨论】:
标签: ios swift xcode uiimage uiimagepickercontroller