1

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.

MTahir
  • 1,173
  • 1
  • 13
  • 25

1 Answers1

3

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

try this method imagePickerController:didFinishPickingMediaWithInfo:

lu yuan
  • 7,207
  • 9
  • 44
  • 78
  • thanks but solved the problem from using the [How can i tell ...](http://stackoverflow.com/questions/7155311/how-can-i-tell-if-the-image-returned-from-didfinishpickingmediawithinfo-was-from?rq=1) – MTahir Jul 19 '12 at 19:29
  • And yes, MediaWithInfo has solved the problem, with little help from above link. – MTahir Jul 19 '12 at 19:31