views:

13

answers:

1

I've this method for opening the photoLibrary/camera in my view controller. But nothing happens when I call it (both simulator and device). I've implemented the delegate methods. No errors/warnings. I'm missing something?

- (IBAction) doButton {
    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
    picker.delegate = self;
    picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
    picker.allowsEditing = YES;
    [self.navigationController presentModalViewController:picker animated:YES];
}
+1  A: 

Should you not just call [self presentModalViewController:picker animated:YES];?

jrtc27