Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我打开 iPod 上的相机时,我的应用程序崩溃了。我用UIImagePickerController这个。该应用程序在 iPhone 上运行良好。
UIImagePickerController
什么可能导致错误?
你可以在 UIImagePickerController 中使用 +isSourceTypeAvailable: 方法:
if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) // Has camera