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

编程入门 行业动态 更新时间:2024-10-27 09:44:46
本文介绍了如何在 UIImagePickerController 之后显示另一个视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我有一个带有按钮的标签栏,单击它会看到一个 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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-29 03:50:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1184019.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:视图   如何在   UIImagePickerController

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!