I have several SKScene done in interface builder in which I have positioned several sprites within the part of the SKScene that is visible on the screen
I want some sprites to only appear later so I start to hide them at the beginning in the didMoveToView method.
override func didMoveToView(view: SKView)
{
// Reading of the sprites created in the SKScene in the interface builder
BackgroundLayer = self.childNodeWithName("BackgroundLayer") as! SKSpriteNode
LettreB = self.childNodeWithName("B0") as! SKSpriteNode
LettreB.hidden = true
LettreR = self.childNodeWithName("R0") as! SKSpriteNode
LettreR.hidden = true
LettreI = self.childNodeWithName("I0") as! SKSpriteNode
LettreI.hidden = true
}
The issue I have is that when running the app I very briefly see all sprites before they are hidden.
Even if I set the blendfactor to 1 (and blendmode to Alpha) in interface builder, the sprites - that are then not visible anymore in the interface builder - very briefly appear then disappear when running the app
Is there a way to avoid that except by putting the sprites outside of the visible area and moving them when I need them to appear ? Should I put the code above somewhere else before didMoveToView is called ?
Note : this issue only happens when running the app directly from the device, not when the app is launch through Xcode, for some performance reasons I guess.