使用presentModalViewController用的UIImagePickerController導致崩潰在iOS 5,我試圖讓該設備上的所有專輯,用「UIImagePickerControllerSourceTypeSavedPhotosAlbum」(上< 5版本,其運行良好)只獲得相機的圖像,所以當我的sourceType的更改爲「UIImagePickerControllerSourceTypePhotoLibrary」它崩潰,我感謝所有幫助,這裏是我的代碼:使用presentModalViewController用的UIImagePickerController導致崩潰在iOS 5
float version = [[[UIDevice currentDevice] systemVersion] floatValue];
if(version < 5)
imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
else
imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
//imgPicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
[self presentModalViewController:imgPicker animated:YES];
當使用iOS 5時,它在此行上崩潰:[self presentModalViewController:imgPicker animated:YES]; – Kazmi
什麼是崩潰消息/異常信息? –
我有同樣的問題(iOS5,iPad,Landscape)。呈現UIImagePickerControllerSourceTypeCamera工作得很好,但UIImagePickerControllerSourceTypePhotoLibrary和UIImagePickerControllerSourceTypeSavedPhotosAlbum沒有。你有沒有找到解決方案? – cschuff