这是我的应用程序代码,我用于选择图像选择器,当图像选择时我想关闭当前视图控制器,因为它在图像选择器本身的关闭时不会从当前视图控制器中关闭,
-(IBAction)selectExitingPicture
{
self.imagePicker = [[GKImagePicker alloc] init];
self.imagePicker.cropSize = CGSizeMake(296, 300);
self.imagePicker.delegate = self;
self.imagePicker.resizeableCropArea = YES;
[self presentViewController:self.imagePicker.imagePickerController animated:YES completion:nil];
}
-(void)imagePicker:(GKImagePicker *)imagePicker pickedImage:(UIImage *)image
{
appDel.im=image;
[self hideImagePicker];
}
- (void)hideImagePicker
{
[self.imagePicker.imagePickerController dismissViewControllerAnimated:YES completion:^{
[self.navigationController pushViewController:viewCont animated:YES ];
}];
}
请帮我解决这个问题,我应该进一步添加什么代码