IOS-iPad ImagePickerView 拍照中,点击“use”,dismiss popover
iPad ImagePickerView 拍照中,点击“use”的同时,dismiss popover即消失所在的框,不必再点击其他区域。
UIImagePickerController的delegate如下:
#pragma mark - UIImagePickerController delegate methods
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo
{
if (image != nil) {
[self.senderBtn setImage:image forState:UIControlStateNormal];
}
[picker dismissModalViewControllerAnimated:YES];
[popoverController dismissPopoverAnimated:YES];//新增,可在点击“use”,使用并显示图片的同时,dismiss popoverController即消失拍照或取照框。
}
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
{
[picker dismissModalViewControllerAnimated:YES];
}