iPhone SDK 3.0 GM

Posted in Me, Objective-C, Programming, Projects, iPhone 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

    • Ahmed: @fernyb.. Thanks man! I forked the project, but I am newbie in open source, and don’t know where to...
    • fernyb: @Ahmed, yeah you can help. It’s hosted on (http://github.com/fernyb/Cupc ake) so you can also fork it...
    • Ahmed: And hey! Can I help with your new PHP framework? plssssssssss :( (
    • Ahmed: hmmmmm I just wanna ask you about something… did you ever create API for Craigslist? I am thinking of...
    • Matt James: Same here… amazing project that I have been very happily using for a while. Sadly it seems to be...


My blog is worth $1,693.62.
How much is your blog worth?


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

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