为什么我们需要在 iPhone 的 ImagePickerController 中实现 UiNavigationcontroller delegate
大家好,我正在使用 Uiimagepickercontroller 录制视频,我需要实现两个委托。1 是 UINavigationcontroller 委托,2 是 UIImagepickercontroller 委托。如果我们不使用 navigationcontroller 委托,它会在代码中发出警告 picker.delegte=self
;
UINavigationControllerDelegate 的必要性是什么.. 我的要求是我自动录制视频..所以在停止录制后,它应该转到屏幕上说 useThis ,放弃选项,然后播放捕获的视频?
有什么办法..可以做到这一点.. 谁能告诉我这个方法以及 UINavigtaioncontrollerdelegate 到底是什么?
谢谢大家
hello all I am using Uiimagepickercontroller to record a video there I need to implement two delegates.. 1 is UINavigationcontroller delegate and 2 is UIImagepickercontroller delegate.If we not use navigationcontroller delegate its giving me warning at the code picker.delegte=self
;
what is the necessity of UINavigationControllerDelegate..
My requirement is I am recording a vedio automatically.. so after it stops recording It should go to the Screen saying that useThis ,Discard options and it plays the video what is captured?
Is there any way.. to do that ..
could any one tell me the way for this and what is the UINavigtaioncontrollerdelegate exactly?
Thank you all
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
UIImagePickerController 是 UINavigationController 的子类。它要求其委托实现 UIImagePickerControllerDelegate 协议,同时仍为其超类实现 UINavigationControllerDelegate 协议。
这意味着您需要像这样声明委托类:
然后实现两个协议所需的方法。
UIImagePickerController is a subclass of UINavigationController. It requires its delegate to implement the UIImagePickerControllerDelegate protocol while still implementing the UINavigationControllerDelegate protocol for its superclass.
That means you need to declare your delegate class like this:
And then implement the required methods for both protocols.