Error when calling a method

Discussion in 'iOS Programming' started by iphonejudy, Jun 26, 2009.

  1. iphonejudy macrumors 6502

    iphonejudy

    Joined:
    Sep 12, 2008
    #1
    I saw the below code in document.

    I need to call the below code in some method
    Code:
    -(BOOL)startCameraPickerFromViewController:(UIViewController*)controller usingDelegate:(id<UIImagePickerControllerDelegate>)delegateObject
    
    {
    
        if ( (![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
    
                || (delegateObject == nil) || (controller == nil))
    
            return NO;
    
     
    
        UIImagePickerController* picker = [[UIImagePickerController alloc] init];
    
        picker.sourceType = UIImagePickerControllerSourceTypeCamera;
    
        picker.delegate = delegateObject;
    
        picker.allowsImageEditing = YES;
    
     
    
        // Picker is displayed asynchronously.
    
        [controller presentModalViewController:picker animated:YES];
    
        return YES;
    
    }
    I used
    Code:
    [self:startCameraPickerFromViewController:controller usingDelegate:delegateObject];
    But i got error
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    What error? Give us some sort of reasonable chance!
     

Share This Page