Stephen Haney

Positioning SKSprites in SpriteKit with
SKScene scaleMode

I quickly ran into a snag upon firing up a new Xcode SpriteKit project and attaching a few test SKSpriteNodes to my SKScene. None of my dummy sprites were showing up at the size or location I anticipated! After a bit of web searching I realized that SKScenes are automatically scaled based on the screen size of the device. I can see how this is pretty handy, but it’s the kind of thing I like to make sure I get right early in the dev process. Here’s how I created a consistent positioning and sizing system I can trust.