标签:
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