Problem Running this error consistently.
This exact code works fine in another application so I'm doubting it's the issue.
-(void)didMoveToView:(SKView *)view {
self.anchorPoint = CGPointMake(0.5, 0.5);
self.backgroundColor = [SKColor colorWithRed:0.15 green:0.15 blue:0.3 alpha:1.0];
cards = [[NSMutableArray alloc] init];
func *functions = [[func alloc]init];
[functions arrayWithRangeFrom:1 to:52 id:cards];
//Add background
NSString *bundle = [[NSBundle mainBundle] pathForResource:@"background" ofType:@"png"];
UIImage *image = [[UIImage alloc] initWithContentsOfFile:bundle];
SKTexture *texture = [SKTexture textureWithImage:image];
background = [SKSpriteNode spriteNodeWithTexture:texture];
background.size = CGSizeMake(self.frame.size.width, self.frame.size.height);
background.position = CGPointMake(0.5, 0.5);
background.zPosition = 0;
background.name = @"backgroundImage";
[self addChild:background];
//END Add Background
}
Returns that error.
.png file is 42kb @ 1920x1080 res.
It's in the supporting files, and is in the images directory.
I'm not sure where to go from here ?