首页 > 其他 > 详细

导航控制器的几种跳转方式

时间:2015-09-26 13:24:56      阅读:249      评论:0      收藏:0      [点我收藏+]
1.当有业务逻辑,需要来回跳转的时候,使用push pop(详见彩票项目的设置按钮的跳转) HMSettingController *vc = [HMSettingController new]; [self.navigationController pushViewController:vc animated:YES]; ------------------------------------------------------------------------------------------------------------------------ 2.当页面只需要跳转一次的时候 (在appDelegate中实现,用到了通知)(详见网络登录页面) //获取控制器,登录页面的控制器 UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Login" bundle:nil]; //跟控制器指向登录页面的控制器 self.window.rootViewController = sb.instantiateInitialViewController; ------------------------------------------------------------------------------------------------------------------------ 3.modal SubViewController *subView = [[SubViewController alloc] initWithNibName:@"SubViewController" bundle:[NSBundle mainBundle]]; //跳转到subview控制器 [self presentViewController:subView animated:YES completion:nil]; //返回 [self dismissViewControllerAnimated:YES completion:nil];

导航控制器的几种跳转方式

原文:http://www.cnblogs.com/lzblog/p/4840628.html

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