In xcode 7, you can use Images.xcassets to create a sprite atlas.
- Click on Images.xcassets
- Click on the bottom bottom in the bottom left
- Select "New Sprite Atlas"
- Then you can drag all the images to the atlas
If you drag all three image sizes with the appropriate suffix (@ 2x and @ 3x), it will automatically fill in your images.
:
let atlas = SKTextureAtlas(named: "Sprites")
let texture = atlas.textureNamed("ball")
let sprite = SKSpriteNode(texture: texture)
:
let texture = SKTexture(imageNamed: "ball")
let sprite = SKSpriteNode(texture: texture)
, SO: xcode.