dismissViewControllerAnimated:completion:
和popViewControllerAnimated:
的区别,如在Stack Overflow和这里所述:
最近我在我的应用程序中发现了一个错误,我使用
-dismissViewControllerAnimated:completion:
方法用于关闭由-presentViewController:animated:completion:
方法呈现的UIViewController。
-popViewControllerAnimated:
方法是UINavigationController用于取消-pushViewController:animated
方法显示的控制器。
[self dismissViewControllerAnimated:completion:]
来关闭一个在导航嵌入式应用程序中通过push呈现的VC。我犯了错误,因为一切都正常工作,我的VC按预期被释放了。
我的问题:混淆这两种方法的后果是什么?