Setting the UIImagePickerController delegate throws a warning about UINavigationControllerDelegate

Posted by synic on Stack Overflow See other posts from Stack Overflow or by synic
Published on 2010-05-13T19:45:57Z Indexed on 2010/05/13 20:04 UTC
Read the original article Hit count: 332

Filed under:

The code:

UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self.navigationController presentModalViewController:picker animated:YES];
[picker release];

The warning, which shows up on the picker.delegate = self; line:

Class 'CardEditor' does not implement the 'UINavigationControllerDelegate' protocol

Why does the UIImagePickerController care if my class implements the UINavigationControllerDelegate protocol?

© Stack Overflow or respective owner

Related posts about iphone