如何在UIImagePickerController之后显示另一个视图

时间:2010-12-16 04:11:50

标签: uiimagepickercontroller

我有一个带有按钮的标签栏,你单击它就可以看到UIImagePickerController。 用户选择图像后,我想要另一个视图。我该怎么办?

我有这个:

- (void)imagePickerController:(UIImagePickerController *)picker
  didFinishPickingImage : (UIImage *)image
             editingInfo:(NSDictionary *)editingInfo
{
imageToPost.image = image;
[picker dismissModalViewControllerAnimated:YES];
PostPopupViewController *postPopup = [[PostPopupViewController alloc] init];
[self presentModalViewController:postPopup animated:YES];
}

但它会返回此错误:

  

* 由于未捕获的异常'NSInternalInconsistencyException'而终止应用程序,原因:'尝试在转换已经进行时开始模式转换。等待viewDidAppear / viewDidDisappear知道当前转换已完成'