Allows editing UIImagePickerViewController doesn't work picking 2 different images

前端 未结 2 564
没有蜡笔的小新
没有蜡笔的小新 2021-01-27 06:43

I have a view with 2 UIImageViews and 2 buttons in order to select 2 different pictures with UIImagePickerViewController. It actually works perfect but

相关标签:
2条回答
  • 2021-01-27 06:52

    in didFinishPickingMediaWithInfo instead of

    let pickedImage = info[UIImagePickerControllerOriginalImage] as? UIImage
    

    use

    let pickedImage = info[UIImagePickerControllerEditedImage] as? UIImage
    
    0 讨论(0)
  • 2021-01-27 07:10

    Update Swift 5.2

    let pickedImage = info[UIImagePickerController.InfoKey.editedImage]
    
    0 讨论(0)
提交回复
热议问题