2014-02-21 176 views
0

我在iPad中弹出窗口内弹出UIImagePickerControllerSourceTypePhotoLibrary型号的UIImagePickerController。我初始化和现在的酥料饼是这样的:UIImagePickerController在iOS7中取消按钮的弹出式窗口中

popoverController = [[UIPopoverController alloc] 
           initWithContentViewController:imagePicker]; 
[popoverController presentPopoverFromRect:popoverRect 
            inView:self.view 
       permittedArrowDirections:UIPopoverArrowDirectionUp 
           animated:YES] 

这显示在iOS的7酥料饼的顶栏上的“取消”按钮右侧的“照片”称号。点击这个按钮什么都不做,我找不到处理它的方式,我如何管理点击事件来关闭弹出窗口,或者只是删除这个“取消”按钮?

感谢

回答

0

您将需要补充一点:

- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker 
{ 

//DO WHATEVER WHEN YOU PRESS CANCEL BUTTON (PROBABLY DISMISSING THE POPOVER 
[picker dismissViewControllerAnimated:YES completion:NULL]; 

} 
+0

谢谢,这方法被调用,然后我需要添加'[popoverController dismissPopoverAnimated:YES];' – AppsDev

相关问题