iPhone SDK 3.0 GM

Posted in iPhone, Me, Objective-C, Programming, Projects on Jun 09, 2009

While looking into my app for deprecated methods I have found one that did not have much documentation to it. It was a delegate method from UIImagePickerControllerDelegate and this is the way I use it for when an image is ready to be posted.

- (void)imagePickerController: (UIImagePickerController *)picker didFinishPickingImage: (UIImage *)img editingInfo: (NSDictionary *)editInfo {
  [[picker parentViewController] dismissModalViewControllerAnimated:YES];
  [image setImage:img];
  [self confirmPhotoUpload];
}

Now the only problem with that method above is that it is now deprecated in the iPhone OS 3.0 SDK and you must now use a method called imagePickerController:didFinishPickingMediaWithInfo:
and the way I use that method is like this:

- (void)imagePickerController: (UIImagePickerController *)picker didFinishPickingMediaWithInfo: (NSDictionary *)info
{
  [[picker parentViewController] dismissModalViewControllerAnimated:YES];
  UIImage * img = [info objectForKey:@"UIImagePickerControllerEditedImage"];
  [image setImage:img];
  [self confirmPhotoUpload];
}

So if your stuck trying to figure out what method to now use, use imagePickerController:didFinishPickingMediaWithInfo: and what will have a NSDictionary with all the needed information about the image.

Trackback URI | Comments RSS

Leave a Reply

  • Recent Comments

    • Gregorio Schrecongost: obviously like your web-site however you need to check the spelling on quite a few of your...
    • ekstra łazienki: 76. I would like to thank you for the efforts you have put in writing this web site. I’m...
    • djcity record pool: Good day! This post could not be written any better! Reading through this post reminds me of my...
    • Aline Shiner: I in addition to my buddies have already been following the excellent secrets from your website while...
    • Eve: Such superb text! No idea how you wrote this report..it’d take me weeks. Well worth it though, I’d assume. Have...

    Recent Listened to Tracks

    Loading...

Bad Behavior has blocked 114 access attempts in the last 7 days.

eastern-avalanche
eastern-avalanche
eastern-avalanche
eastern-avalanche