解雇ViewControllerAnimated VS popViewControllerAnimated [英] dismissViewControllerAnimated VS popViewControllerAnimated
本文介绍了解雇ViewControllerAnimated VS popViewControllerAnimated的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道它们有什么不同.我什么时候可以打电话
I want to know what is the different of them. when I can call
[self dismissViewControllerAnimated:YES completion:nil];
以及我什么时候应该打电话
and when I should call
[self.navigationController popViewControllerAnimated:YES];
根据苹果的文件:解雇ViewControllerAnimated 手段关闭接收器提供的视图控制器."但是我总是无法通过这种方法关闭视图控制器.
according document of apple: dismissViewControllerAnimated means "Dismisses the view controller that was presented by the receiver." But I always fail to dismiss view controller by this method.
推荐答案
您选择的应用程序是基于导航的应用程序方式
your selected application is navigation based application means
[self.navigationController popViewControllerAnimated:YES];
您选择的应用程序不是基于导航的应用程序方式
your selected application is other than the navigation based application means
[self dismissViewControllerAnimated:YES completion:nil];
这篇关于解雇ViewControllerAnimated VS popViewControllerAnimated的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文