I can't seem to get my background to show the image.
Here is the code:
@implementation GameScene
- (id)initWithSize:(CGSize)size {
if ((self = [super initWithSize:size])) {
self.anchorPoint = CGPointMake(0.5, 0.5);
SKSpriteNode *background = [SKSpriteNode spriteNodeWithImageNamed:@"Background"];
[self addChild:background];
}
return self;
}
@end
- (void)viewDidLoad
{
[super viewDidLoad];
// Configure the view.
SKView * skView = (SKView *)self.view;
skView.showsFPS = YES;
skView.showsNodeCount = YES;
/* Sprite Kit applies additional optimizations to improve rendering performance */
skView.ignoresSiblingOrder = YES;
// Create and configure the scene.
GameScene *scene = [GameScene unarchiveFromFile:@"GameScene"];
scene.scaleMode = SKSceneScaleModeResizeFill;
// Present the scene.
[skView presentScene:scene];
}