1
我正在嘗試編寫一個應用程序,允許用戶從iPad上的照片庫中選擇圖像。我在網上做了完全的消息來源說,它應該完成,但是當我點擊按鈕只有箭頭顯示在屏幕上,沒有別的。應顯示圖像的彈出窗口不顯示。任何人都可以告訴我爲什麼會發生這種情況?這裏是我的代碼:Popover不顯示iPad照片庫
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
[picker setDelegate:self];
[picker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
[picker setAllowsEditing:YES];
popoverController = [[UIPopoverController alloc] initWithContentViewController:picker];
[popoverController presentPopoverFromRect:self.view.frame inView:[self view] permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];