在iOS6上dismissModalViewControllerAnimated崩溃 [英] dismissModalViewControllerAnimated crashing on iOS6

查看:70
本文介绍了在iOS6上dismissModalViewControllerAnimated崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正面临iOS 6.0的崩溃。我有一个视图控制器从中我以模态方式呈现导航视图控制器,然后从导航堆栈我模拟地呈现另一个视图控制器,最后解除整个模态堆栈我将以下消息传递给我显示导航的第一个视图控制器控制器。

I am facing a crash on iOS 6.0. I have a view controller from which I present a navigation view controller modally and then from the navigation stack I present another view controller modally and finally to dismiss the whole modal stack I pass the following message to my first view controller from where I showed the navigation controller.

现在这适用于6.0以下的iOS。我该怎么办呢?

Now this works fine on iOS below 6.0. How should I handle this?

[self dismissModalViewControllerAnimated:YES];

[self dismissModalViewControllerAnimated:YES];

推荐答案

我也遇到了类似的崩溃,其中一件事让我解决了这个问题:

I had this similar crash as well and one of the things helped me solve it was adding:

vc.modalPresentationStyle = UIModalPresentationCurrentContext;

vc.modalPresentationStyle = UIModalPresentationCurrentContext;

这篇关于在iOS6上dismissModalViewControllerAnimated崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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