iphone - Delay reloadData on UITableView -


i have uitableview. on tap of button want display custom view, then, once view visible, remove particular item tableview. custom view hides tableview remove occur after new view visible.

currently, have this, adds custom view , should remove item, , reload table, reload occurring animation ends (i have animation block, changing views alpha), can see update.

[self.view addsubview:customview]; [itemarray removeobject:object]; [self.tableview reloaddata]; 

how can delay reload until after view visible?

thanks.

you mention you're animating view yourself; should call reloaddata when animation completes using like:

[uiview setanimationdelegate:self]; [uiview setanimationdidstopselector:@selector(methodthatcallsreloaddata)];  // or [uiview setanimationdelegate:self.tableview]; [uiview setanimationdidstopselector:@selector(reloaddata)]; 

or if you're using block-based api:

[uiview animatewithduration:... completion:^(bool finished) {     [self.tableview reloaddata]; }]; 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -