问题描述
限时送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:关键词]
发布评论