2013-10-02 34 views
0

这是我如何用我的IPC:模拟器上工作的UIImagePickerController,崩溃的设备

ipc = nil; // reset (camera may be running) 
ipc = [[UIImagePickerController alloc] init]; 
[ipc setDelegate:self]; 

ipc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; 

[self presentViewController:ipc animated:YES completion:^(void){ 
    [self cancelShoot]; 
}]; 

它运作良好,在3GS的iOS 6,我也有在iOS模拟器7没有任何问题。在iOS 7设备(iPod 5,iPhone 4,iPhone 5)上测试时,它总是崩溃。

我应该知道最新的操作系统有什么新东西吗?

+0

很可能你的方法调用[self cancelShoot];崩溃你的应用程序,调试到它。 – Engnyl

+1

尝试评论第一行ipc = nil和[self cancelshoot]并看它是否还在崩溃? – iAhmed

+0

听起来像一个dup http://stackoverflow.com/questions/18939537/uiimagepickercontroller-crash-only-on-ios-7-ipad – Chrix

回答

0

“ipc”是一个指针吗?鉴于你如何设置sourceType它看起来像不是..

相关问题