storyboard 创建了多个UIViewController,但由于项目原因,不能使用segue,所以需要在button的单击事件中,调用另一个UIViewController,并显示出来,代码如下:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
GameViewController *gvc = (GameViewController*)[storyboard instantiateViewControllerWithIdentifier:@"id_my_view_controller"];
[self presentViewController:gvc animated:TRUE completion:nil];
// Main 为storyboard 的名字;id_my_view_controller 为该UIViewController 在storyboard 里设置的 id。