Search code examples
iosswiftuiimagepickercontroller

Can ImagePickerController have the previewView when picked photo done?


I have a view controller with UIImagePickerControllerDelegate and UINavigationControllerDelegate to pick photo.

I also want to make the same preview view when I picked photo done like the preview view when I taken photo done.

make this preview view When I pick photo done

Have any suggestion? Thx!


Solution

  • You can get the UIImagePickerController to show the preview screen when choosing a photo if you set picker.allowsEditing to true. Be aware though that this will allow users to crop and reposition their photo in both the photo library and camera source types.