Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我做了一个故事板游戏。我设置了 3 条生命,现在我想当所有生命都消失时调用另一个视图控制器,比如结果视图控制器来播下分数结果。我该怎么做?调用另一个控制器?
试试这个代码来加载你的视图控制器:
YourViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"YourIdentifire"]; [self.navigationController pushViewController:controller animated:YES];