码迷,mamicode.com
首页 > 其他好文 > 详细

页面跳转的方法总结

时间:2014-10-16 19:18:12      阅读:180      评论:0      收藏:0      [点我收藏+]

标签:style   http   io   os   sp   div   on   ad   ef   

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

页面跳转的方法总结

标签:style   http   io   os   sp   div   on   ad   ef   

原文地址:http://www.cnblogs.com/guozai9527/p/4029149.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!