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

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -