Xcode>File>Project>Gameで生成された、GameViewController.swiftの中でスクリーンショットを撮ろうとした。 失敗したコード 調べてみると、以下の記事が出てきた。 How to take Full screen Screenshot in swift? UIGraphicsBeginImageContext(view.frame.size) view.layer.renderInContext(UIGraphicsGetCurrentContext()) let image = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() UIGraphicsBeginImageContextWithOptions(UIScreen.mainScreen().bound
![[Swift]Spritekitでスクリーンショットを撮る - Qiita](https://cdn-ak-scissors.b.st-hatena.com/image/square/8029f6756cc752b1c8a90479b38fed2c38d76f3c/height=288;version=1;width=512/https%3A%2F%2Fqiita-user-contents.imgix.net%2Fhttps%253A%252F%252Fcdn.qiita.com%252Fassets%252Fpublic%252Farticle-ogp-background-412672c5f0600ab9a64263b751f1bc81.png%3Fixlib%3Drb-4.0.0%26w%3D1200%26mark64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTk3MiZoPTM3OCZ0eHQ9JTVCU3dpZnQlNURTcHJpdGVraXQlRTMlODElQTclRTMlODIlQjklRTMlODIlQUYlRTMlODMlQUElRTMlODMlQkMlRTMlODMlQjMlRTMlODIlQjclRTMlODMlQTclRTMlODMlODMlRTMlODMlODglRTMlODIlOTIlRTYlOTIlQUUlRTMlODIlOEImdHh0LWFsaWduPWxlZnQlMkN0b3AmdHh0LWNvbG9yPSUyMzIxMjEyMSZ0eHQtZm9udD1IaXJhZ2lubyUyMFNhbnMlMjBXNiZ0eHQtc2l6ZT01NiZzPTE1ZDdkMjI4ZTc3ZmQ4ZWM0ZWJhYzg4YzFkNDhkNGQ3%26mark-x%3D142%26mark-y%3D57%26blend64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZoPTc2Jnc9NzcwJnR4dD0lNDBuYW95YXNoaWdhJnR4dC1jb2xvcj0lMjMyMTIxMjEmdHh0LWZvbnQ9SGlyYWdpbm8lMjBTYW5zJTIwVzYmdHh0LXNpemU9MzYmdHh0LWFsaWduPWxlZnQlMkN0b3Amcz1mYTg0MmM1NGFmZDMwN2U3MWE2MTI0NWJkNzA1MWZkNw%26blend-x%3D142%26blend-y%3D486%26blend-mode%3Dnormal%26s%3D6b66ca4e20eabfa1147e7dae414ced60)