We will quickly overrun our project navigator with image files if we add all our textures as we did with our bee. Luckily, Xcode provides several solutions.
We can store images in an .xcassets
file and refer to them easily from our code. This is a good place for our background images:
Open
Images.xcassets
from your project navigator.We do not need to add any images here now but, in the future, you can drag image files directly into the image list, or right-click, then Import.
Notice that the SpriteKit demo's spaceship image is stored here. We do not need it anymore, so we can right-click on it and choose Removed Selected Items to delete it.