提案されたことを試してみましたが、出力は白くて空白のスクリーンショットでした。これにより、ビューに何も追加していないと思います。ビューにグラフィックを追加する方法は次のとおりです。addChild メソッドは SpriteKit に付属しており、SKSpriteNodes を取り込みます。
addChild(background)
addChild(rate)
addChild(scoreLabel)
addChild(share)
addChild(playAgain)
addChild(highScoreLabel)
addChild(scoreBackground)
addChild(highScoreBackground)
スクリーンショットを撮る方法は次のとおりです。
UIGraphicsBeginImageContext(self.view!.bounds.size)
self.view!.layer.renderInContext(UIGraphicsGetCurrentContext())
let screenshot = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
UIImageWriteToSavedPhotosAlbum(screenshot, nil, nil, nil)
どんな提案も役に立ちます