[英]UIImagePickerController inside UIPopoverController doesn't show Cancel button on iOS7
[英]UIImagePickerController within a popover with cancel button in iOS7
我在iPad的彈出窗口中顯示了UIImagePickerController
類型的UIImagePickerControllerSourceTypePhotoLibrary
。 我初始化並顯示彈出窗口,如下所示:
popoverController = [[UIPopoverController alloc]
initWithContentViewController:imagePicker];
[popoverController presentPopoverFromRect:popoverRect
inView:self.view
permittedArrowDirections:UIPopoverArrowDirectionUp
animated:YES]
這將在iOS 7中彈出框的頂部欄上,在“照片”標題的右側顯示“取消”按鈕。 輕按此按鈕不會執行任何操作,我也找不到處理該按鈕的方法,如何管理輕擊事件以消除彈出窗口,或者只是刪除此“取消”按鈕?
謝謝
您將需要添加以下內容:
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
{
//DO WHATEVER WHEN YOU PRESS CANCEL BUTTON (PROBABLY DISMISSING THE POPOVER
[picker dismissViewControllerAnimated:YES completion:NULL];
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.