UIImagePickerController在iOS10上崩溃 [英] UIImagePickerController crashes on iOS10

查看:745
本文介绍了UIImagePickerController在iOS10上崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iOS10 上使用照片库来呈现 UIImagePickerController 时,我的应用程序崩溃了。

On presenting UIImagePickerController with photo library source on iOS10, my app crashes.

在带有相机源的 iOS10和带有照片库和相机源的 iOS9 上,应用程序不会崩溃。

On iOS10 with camera source and on iOS9 with photo library and camera sources, the app does not crash.

该应用程序是用 Swift 2.2 编写的,由 Xcode 7.3.1 构建。

The app is written in Swift 2.2 and built by Xcode 7.3.1.

为什么崩溃发生?

let imagePicker = UIImagePickerController()
imagePicker.sourceType = .PhotoLibrary
imagePicker.allowsEditing = true
imagePicker.delegate = self
self.presentViewController(imagePicker, animated: true, completion: nil)

推荐答案

我通过更新到最新版解决了崩溃问题Xcode版本。
这里也讨论了这个问题: https:// github .com / Leanplum / Leanplum-iOS-SDK / issues / 12

I solved the crash by updating to the latest Xcode version. The problem has been discussed here as well: https://github.com/Leanplum/Leanplum-iOS-SDK/issues/12

这篇关于UIImagePickerController在iOS10上崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆