didFinishPickingImage woes

Discussion in 'iOS Programming' started by beardedpig, Mar 29, 2009.

  1. beardedpig macrumors member

    Joined:
    Dec 17, 2008
    #1
    Does anyone know how to get this to fire when saving an image with the camera?

    I have tried setting the delegate of the class like this:

    picker.delegate = self

    and

    picker.delegate =appDelegate

    where appDelegate is set to the application delegate.

    The code where this resides is in RootViewController and is complying to the right delegate protocols.

    However nothing I do will get the didFinishPickingImage method to fire?

    Thanks for any pointers
     
  2. ghayenga macrumors regular

    Joined:
    Jun 18, 2008
    #2
    picker.delegate = self; is correct.

    And in your RootViewController.h did you set it to implement the UIImagePickerDelegate protocol? i.e.

    RootViewController : NSObject <UIImagePickerDelegate>{
     
  3. beardedpig thread starter macrumors member

    Joined:
    Dec 17, 2008
    #3
    cha ching!

    Thanks!!!!!

    I had the root view controller set to the correct delegates.....but...

    you brought to my attention I had rather foolishly placed the didFinishPickingImage inside my custum UIImagePickerController and not where it was supposed to be in the root view controller!

    What a pillock I am!!!

    Thanks
     

Share This Page