I'm trying to debug a very strange behaviour of SpriteKit animation. It's quite easy to reproduce:
- Create a new Game project in Xcode leaving all the options unchanged.
- Open GameScene.swift and change line #23 from label.run(SKAction.fadeIn(withDuration: 2.0)) to label.run(SKAction.fadeIn(withDuration: 0.2))
- Connect your phone and start a debugging session, observe how the text (Hello, World!) fades in and appears in full brightness. Well, so far, so good.
- Stop the application from Xcode and start it again clicking its icon on your phone.
- Observe how the text, although visible, is not faded in completely.
I found this trying to understand why my animation just stops half the way when my application loads. I assume that somehow the view stops refreshing if some initialisation step is longer than the animation but I don't know how to fix this. I also noticed that if you click on the screen it refreshes and the animated view appears in the final state.
iOS version: 10.3