1
我的iPad模擬器工作,我想在iPad的照片庫查看圖像,但它是有問題的:UIPopoverController沒有運行
「NSInvalidArgumentException」的,理由是:
「在iPad上,的UIImagePickerController必須通過UIPopoverController呈現」這是我的代碼。幫我!
- (IBAction)ShowGallery:(id)sender {
if([UIImagePickerController isSourceTypeAvailable:
UIImagePickerControllerSourceTypePhotoLibrary]) {
picker = [[UIImagePickerController alloc]init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:picker animated:YES];
}
看到這個答案:http://stackoverflow.com/questions/9015155/how -to-使用-的UIImagePickerController功能於iPad的/ 9019460#9019460 –