Search code examples
sprite-kitsksceneuibackgroundcolor

Animate the background colour of a SKScene


Is it possible to do this?

Using UIView animations doesn’t work, as expected.

Currently, I’m using about 80 different sprites which animate, which is a big memory issue as well as much more complex to create so many images then import and code them as oppose to just setting the colour in a few lines of code.


Solution

  • Add SKSpriteNode with size of the scene and animate it with SKActions