ios - How to set up spinner between SKScene transitions? -


i have heavyweight scene takes 5 seconds load.
want loading screen spinner appear while waiting load - elegant solution that?

should make intermediate scene , show spinner on while scene loads?

can alloc , initwithsize scene in background thread?

here how now:

myscene *newscene = [[myscene alloc] initwithsize:self.size]; sktransition *transition = [sktransition fliphorizontalwithduration:1.0]; [self.view presentscene:newscene transition:transition]; 

but press button - game freezes these 5 seconds , provides no feedback player going on.

tagging coco2d since has similar api , problems.

don't things on background thread. can show spinner first, dispatch_async actual transition:

// write code showing spinner  dispatch_async(dispatch_get_main_queue(), ^{     myscene *newscene = [[myscene alloc] initwithsize:self.size];     sktransition *transition = [sktransition fliphorizontalwithduration:1.0];     [self.view presentscene:newscene transition:transition]; }); 

this show spinner , on next run loop execute transition.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -