1、单个storyboard跳转
UIStoryboard *board = self.storyboard; HomeController *homevc = [board instantiateViewControllerWithIdentifier:@"homevc"]; [self.navigationController pushViewController: homevc animated:YES];
2.多个:
UIStoryboard *board = [UIStoryboard storyboardWithName:@"Login" bundle:nil]; LoginController *loginvc = [board instantiateViewControllerWithIdentifier:@"loginvc"]; [self.navigationController pushViewController: loginvc animated:YES];
PS:在有多个storyboard的情况下,都要替换成这种声明方式
*不同跳转方式:
//Modal方式
[self presentModalViewController:my_device_vc animated:YES];//使用了navitgation
[self.navigationController pushViewController: loginvc animated:YES];
//回退
[self.navigationController popViewController animated:YES];