UIKit . @yaali, CameraContents . , background.contents, , , viewWillAppear. , ARKit AVCaptureVideoPreviewLayer ARSCNView.scene.background.cocntents.
override func motionBegan(_ motion: UIEventSubtype, with event: UIEvent?) {
if CameraContents == nil {
CameraContents = sceneView.scene.background.contents;
return
}
if cameraBackGround == true {
sceneView.scene.background.contents = "Background_sky.png"
}else{
sceneView.scene.background.contents = CameraContents
}
cameraBackGround = !cameraBackGround
}