ios - UIImagePickerController 不调用委托(delegate)方法

标签 ios objective-c uiimagepickercontroller

我有一个 UIImagePickerController,其 sourceType 设置为 UIImagePickerControllerSourceTypeSavedPhotosAlbum 并且允许编辑。

它的委托(delegate)方法不会被调用。

如果 sourceType 是 UIImagePickerControllerSourceTypeCamera 或者如果我关闭 allowsEditing 则它们被调用。

有人知道为什么吗?

最佳答案

您是否正在将委托(delegate)连接到自己?

yourpickercontroller.delegate = self

将此添加到 viewDidLoad

关于ios - UIImagePickerController 不调用委托(delegate)方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29371157/

相关文章:

ios - UITapGestureRecognizer 在关闭 viewController 后导致崩溃

ios - 与推送交互后导航到特定 ViewController

swift - 使用相机向 UIPageViewController 添加多个图像

ios - 无法使用 UIImagePicker 平移从相机拍摄的图像

ios - iPhone 4 中 IOS 7 中奇怪的 UIScrollview 行为

ios - 处理在 AppDelegate 中打开多个 URL

ios - 如何扩大 MPVolumeView 路由按钮区域?

ios - 调用 initWithBitmapData 时未分配正在释放的 Malloc 指针错误

iphone - 从应用程序本身访问相机

ios - 不允许在ios 10 itms-books中出现URL方案问题