IOS基础:窗口切换的几种方法

1 controller切换
AboutViewController *aboutViewController = [[AboutViewController alloc]init];

[self.navigationController pushViewController:aboutViewController animated:YES]; //新视图压入到栈中

[AboutViewController release];


AboutViewController 返回按钮:
[self.navigationController popViewControllerAnimated:YES];//弹出后返回到原视图

2 从上向上滑出
NewProfileViewController *newProfileController =[[ewProfileViewController alloc]init];

[self.navigationController presentModalViewController:newProfileController animated:YES];

[newProfileController release];

NewProfileViewController取消按钮:
[self dismissModalViewControllerAnimated:YES];

3 弹出窗口

4 窗口翻转

原文地址:https://www.cnblogs.com/martin1009/p/2545211.html