【发布时间】:2015-07-01 04:36:14
【问题描述】:
我在 Spritekit 中工作,我正在尝试从我的 SKScene 中呈现一个 UIAlertController,但我在执行此操作时遇到了麻烦。我看过几个教程,但没有一个 UIAlertController 教程是专门针对 Spritekit 的。我一直在下面看到这段代码,但由于 SKScene 不是 UIViewController,因此它没有生效。
[self presentViewController:self animated:YES completion:nil];
我有下面的其余相关代码。谁能帮我在我的 SKScene 上展示我的 UIAlerController。
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"You Lose!" message:@"Do You Want To Beat This Level?" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *CancelButton = [UIAlertAction actionWithTitle:@"GiveUp" style:UIAlertControllerStyleAlert handler:<#^(UIAlertAction *action)handler#>]
【问题讨论】:
标签: ios objective-c sprite-kit uialertcontroller uialertaction