如何以编程方式退出iPhone应用中的视图
答案 0 :(得分:7)
这是一个非常含糊的问题......我可以通过几种方式解释它:
1)如何在导航控制器中手动关闭视图控制器
[self.navigationController popViewControllerAnimated:YES];
2)如何在导航控制器中手动关闭模态视图控制器
[self.navigationController dismissModalViewControllerAnimated:YES];
3)从视图层次结构中删除视图
[theView removeFromSuperview];
4)如何以编程方式退出应用程序
exit(0);