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

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -