Reputation: 1284
I have a Sprite Kit game, and a want to set the background like this:
SKSpriteNode *background = [SKSpriteNode spriteNodeWithImageNamed:@"stars"];
background.position = CGPointMake(CGRectGetMidX(self.frame),CGRectGetMidY(self.frame));
background.size = CGSizeMake(self.frame.size.width , self.frame.size.height);
[self addChild:background];
This works fine on the simulator (iphone5), but on real device (iphone5 also), a big red X image appears instead of the picture. I tried to reduce the size of the file, so it's not the biggest picture in the game (63 Kb) and still not working.
Thanks for any help.
Upvotes: 0
Views: 1280
Reputation: 20274
The big red X means that SpriteKit could not find the image you have specified.
Here's what you can do to fix this:
Upvotes: 1