1、addsubview方法切换视图
self.view addSubview:(加载的新页面);
相应的 [self.view removeFromSuperview];移除添加的view
2、self.view insertSubview:(加载的新页面) atIndex:n;
对n的解释:页面都是层次叠加的,n表示加载到那一层上面
另外[self.view addSubView:xx.view] 其实就等于[self.view insertSubView:xx.view atIndex:[self.view.subViews count]];
3、presentModalViewController方法
photoNacController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
photoNacController.modalPresentationStyle = UIModalPresentationFullScreen;
self presentModalViewController:(加载的新页面) animated:
4、pushViewController 导航
[self.navigationController pushViewController:(加载的新页面) animated:YES];
对应的
[self.navigationController popViewControllerAnimated:YES];
http://www.iseven-it.com/?p=711
时间: 2024-11-02 23:49:17