iphone - How to hold for a moment in program? -


i fetching data facebook , during time of fetching data, taking few milliseconds or second. want on hold untill fetched data perfectly.

how write code this?

- (void)viewdidload  {     [self performselectorinbackground:@selector(startfatching) withobject:nil];         [super viewdidload]; } - (void) startfatching {     [self performselectoronmainthread:@selector(startindicator) withobject:nil waituntildone:no];      nsautoreleasepool *pool = [[nsautoreleasepool alloc] init];           // code         [self performselectoronmainthread:@selector(stopindicator) withobject:nil waituntildone:no]; [pool release]; }  - (void) startindicator {     av.hideswhenstopped = yes;     [av startanimating]; }  - (void) stoprindicator {    [av stopanimating]; } 

hope give idea


Comments

Popular posts from this blog

actionscript 3 - TweenLite does not work with object -

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

c# - Global Variables vs. ASP.NET Session State -