//将我们的storyBoard实例化,“Main”为StoryBoard的名称
UIStoryboard *mainStoryBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
//将第二个控制器实例化,"main"为我们设置的控制器的ID
UIViewController *vc=[mainStoryBoard instantiateViewControllerWithIdentifier:@"main"];
//跳转
[self.navigationController pushViewController:vc animated:YES];
网友评论