如何在 UIImagePickerController 之后显示另一个视图 [英] How to show another view after a UIImagePickerController

查看:31
本文介绍了如何在 UIImagePickerController 之后显示另一个视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有按钮的标签栏,单击它会看到一个 UIImagePickerController.在用户选择图像后,我想要另一个视图.我该怎么做?

I've a tabbar with a button, you click it and you see an UIImagePickerController. After the user choose the image I want another view. How can I do it?

我有这个:

- (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 知道当前过渡已经完成'

* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempting to begin a modal transition from to while a transition is already in progress. Wait for viewDidAppear/viewDidDisappear to know the current transition has completed'

推荐答案

试试这些:

iPhone 应用程序异常:模态转换已经进行中

呈现模态视图控制器只有在另一个被解雇后

iPhone - 检测动画结束

从 UIImagePickerController 呈现另一个模态视图

这篇关于如何在 UIImagePickerController 之后显示另一个视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆