首页 > 其他 > 详细

页面跳转的方法总结

时间:2014-10-16 17:19:23      阅读:142      评论:0      收藏:0      [点我收藏+]
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

页面跳转的方法总结

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!