当我在 iPhone 上使用时,应用程序崩溃UIImagePicker
了,但仅在iOS 7上。我使用以下代码行
picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = YES;
if( [UIImagePickerController isCameraDeviceAvailable:UIImagePickerControllerCameraDeviceFront] || [UIImagePickerController isCameraDeviceAvailable:UIImagePickerControllerCameraDeviceRear])
{
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
} else {
//[self showAlertViewWithTitle:@"Sorry" message:@"Your Device Don't Have Camera"];
}
[self presentViewController:picker animated:YES completion:nil];
}
该应用程序在 iOS 6 上运行,而不是在 iOS 7 上运行。我是这个网站的新手,请帮忙。