从嵌入UITabBarController的UIViewController我执行模态segue
self.present(.....
生活"自我"我的视图控制器在我的UITabBarController中。新的ViewController显示完美,让我们称之为ViewController2
ViewController1
以模态方式呈现它。如果我试图解除ViewController2
,它总是会因未知例外而崩溃。 libc++abi.dylib: terminating with uncaught exception of type NSException.
ViewController2
已嵌入UINavigationController
,但此ViewController2
是唯一崩溃的presentingViewController
。
我尝试解雇presentationController
,presentedViewController
,self.navigationController?.dismiss
和UITabBarController->ViewController1 -modally present- UINavigationController->ViewController2
,但没有任何内容对我有用。
架构为:guard let vcDetail = UIStoryboard(name: "ProjectDetailStoryBoard\(currentDevice)", bundle: nil).instantiateViewController(withIdentifier: "vcDetailProject") as? ProjectDetailController else{return}
vcDetail.instantiatedFromPushNotification = true
vcDetail.projectId = key
let vc = UINavigationController(rootViewController: vcDetail)
UIApplication.topViewController()?.present(vc, animated: true, completion: nil)
这是我的呈现代码:
@IBAction func dismissView(){
dismiss(animated: true, completion: nil)
}
这是我的解雇代码:
{% for radio in form.client_profile %}
<label for="{{ radio.id_for_label }}">
{{ radio.choice_label }}
<span class="radio">{{ radio.tag }}</span>
</label>
{% endfor %}