How to view but not edit an image selected with UIImagePickerController in iOS

Hope someone can help me. I am using imagePicker to select an image from my photo library in an iOS chat app.

I want the image selection behavior to be simulated in iMessage. The specific problem I am facing is previewing the selected image. I want to view this preview and select or deselect, but NOT edit.

If I set imagePicker.allowsEditing = True, a preview of the selected image is shown, however I can scroll and scale it. I want the image to just display statically.

If I set imagePicker.allowsEditing = False, once the image is fetched from the library, the didFinishPickingMediaWithInfo function is called without previewing the image. If I then add a segue method to that method and set up my own view, there is no way to go back to the library as it has already been fired.

Basically, I just want to emulate the iMessage method for getting an image from my library and was hoping to do it without using a custom imagePicker

thank

+3


source to share





All Articles