Reputation: 23
I want to create a loading screen which can actually load the whole project in Xcode. I have no idea for now how to do it. Hope you can help.
Upvotes: 0
Views: 995
Reputation: 11696
I am taking a guess that you might be referring to loading one or numerous SKTextureAtlas. If so, then you can try this code:
NSLog(@"start loading...");
SKTextureAtlas *atlas1 = [SKTextureAtlas atlasNamed:MyAtlas_1];
SKTextureAtlas *atlas2 = [SKTextureAtlas atlasNamed:MyAtlas_2];
SKTextureAtlas *atlas3 = [SKTextureAtlas atlasNamed:MyAtlas_3];
[SKTextureAtlas preloadTextureAtlases:[NSArray arrayWithObjects: atlas1, atlas2, atlas3, nil] withCompletionHandler:^{
NSLog(@"loading done...");
// loading is done so do whatever you need to here...
}];
Upvotes: 1