简体   繁体   中英

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.

Thanks.

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

try this method imagePickerController:didFinishPickingMediaWithInfo:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM