当你从另一个viewController呈现一个viewController时,你会这样做:
let vc : UIViewController = storyboard.instantiateViewControllerWithIdentifier("viewController") as UIViewController; self.presentViewController(vc,animated: true,completion: nil);
我想从SKScene呈现一个viewController.我没有找到任何办法.
这个问题可能是重复的,但我刚刚在客观C中找到了对我没有意义的答案
解决方法
在场景类中尝试以下操作:
var currentViewController:UIViewController=UIApplication.sharedApplication().keyWindow.rootViewController! currentViewController.presentViewController(viewController,completion: nil)
我希望它有所帮助.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。