我有一个 SpriteKit 项目。我看过 WWDC15 for ReplayKit 的视频,但是当我想使用代码时,我有这个错误:
“GameScene”类型的值没有成员“previewViewController”
我用过这段代码:
func levelWillEnd() {
let sharedRecorder = RPScreenRecorder.sharedRecorder()
sharedRecorder.stopRecordingWithHandler {
(previewViewController, error) -> Void in
if previewViewController != nil {
self.previewViewController = previewViewController
}
}
}