How to show another view after a UIImagePickerController

懵懂的女人 提交于 2019-12-11 23:52:06

问题


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?

I've this:

- (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];
}

But it returns this error:

* 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'


回答1:


Try these:

Exception in iPhone app : Modal transition is already in progress

Presenting a modal view controller only after another one has been dismissed

iPhone - Detect the end of the animation

Present another modal view from UIImagePickerController



来源:https://stackoverflow.com/questions/4457361/how-to-show-another-view-after-a-uiimagepickercontroller

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!