MTahir MTahir - 3 years ago 123
iOS Question

iOS UIImagePicker didFinishPickingMediaWithInfo Vs editingInfo

I am trying to create an app, which can take photos from camera and can also pic images from gallery.

But the problem I am having is,

When I chose to take picture from Camera it works fine, I'm using

- (void) imagePickerController: (UIImagePickerController *) pickerr didFinishPickingMediaWithInfo: (NSDictionary *) info;

But when I go for the gallery to pic an images, using

- (void)imagePickerController:(UIImagePickerController *)pickerr didFinishPickingImage:(UIImage *) image editingInfo:(NSDictionary *)editingInfo;

the above method is executed and the pic I have selected is saved again.

If I comment the first method then I am able to show the selected image in UIImageView.

What should be changed, so that both can work perfectly.


Answer Source

As imagePickerController:didFinishPickingImage:editingInfo: is Deprecated in iOS 3.0

try this method imagePickerController:didFinishPickingMediaWithInfo:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download