2

当我打开 iPod 上的相机时,我的应用程序崩溃了。我用UIImagePickerController这个。该应用程序在 iPhone 上运行良好。

什么可能导致错误?

4

1 回答 1

4

你可以在 UIImagePickerController 中使用 +isSourceTypeAvailable: 方法:

if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera])
   // Has camera
于 2013-04-21T18:48:06.800 回答