我在iPad中的popover中显示UIImagePickerController
类型UIImagePickerControllerSourceTypePhotoLibrary
。我初始化并呈现这样的popover:
popoverController = [[UIPopoverController alloc]
initWithContentViewController:imagePicker];
[popoverController presentPopoverFromRect:popoverRect
inView:self.view
permittedArrowDirections:UIPopoverArrowDirectionUp
animated:YES]
在iOS 7的popover顶部栏上显示“取消”按钮,直到“照片”标题。点击此按钮什么都不做,我找不到处理它的方法,如何管理点击事件以解除弹出窗口,或者只是删除这个“取消”按钮?
由于
答案 0 :(得分:0)
您需要添加以下内容:
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
{
//DO WHATEVER WHEN YOU PRESS CANCEL BUTTON (PROBABLY DISMISSING THE POPOVER
[picker dismissViewControllerAnimated:YES completion:NULL];
}