Why do we need to implement the UiNavigationcontroller delegate in ImagePickerController in iphone

hello all I use Uiimagepickercontroller to record video where I need to implement two delegates. 1 is a delegate to the UINavigationcontroller, and 2 is a delegate to the UIImagepickercontroller. If we do not use the navigationcontroller delegate, it gives me a warning in the code picker.delegte=self ;

What is the need for UINavigationControllerDelegate .. My requirement: I automatically record vedio .. so after stopping it, the recording should go to the screen saying that useThis, Discard options, and it plays the video, what is captured?

Is there a way ... to do this .. can someone tell me the way for this and what exactly is the UINavigtacontrollerdelegate exactly?

Thank you all

+4
source share
1 answer

UIImagePickerController is a subclass of UINavigationController. He requires his delegate to implement the UIImagePickerControllerDelegate protocol, while still implementing the UINavigationControllerDelegate protocol for his superclass.

This means that you need to declare your delegate class as follows:

 @interface MyDelegate : NSObject <UIImagePickerControllerDelegate, UINavigationControllerDelegate> 

And then implement the necessary methods for both protocols.

+2
source

All Articles