您的位置:首页 > 其它

页面跳转的方法总结

2014-10-16 16:35 239 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: