Animating the backgroundColor
property of a SCNView
happens instantly, instead of gradually over the specified duration.
Here's the code:
UIView.animate(withDuration: 0.5, animations: {
self.sceneView.backgroundColor = UIColor.redColor
})
This question is similar, but its solutions didn't work. Specifically, setting the backgroundColor
beforehand and animating against the layer
property did not help.
How can you animate the backgroundColor
of a SCNView
?