You will first say that tableView is waiting for an update using beginUpdates . Then update the relevant sections (if your tableView has only one section, and then just skip zero for the section number). Here, where you specify the animation, you can play with it to get the desired effect. After that, you call endUpdates in the tableView. The typedef for UITableViewRowAnimation states:
typedef enum { UITableViewRowAnimationFade, UITableViewRowAnimationRight, UITableViewRowAnimationLeft, UITableViewRowAnimationTop, UITableViewRowAnimationBottom, UITableViewRowAnimationNone, UITableViewRowAnimationMiddle, UITableViewRowAnimationAutomatic = 100 } UITableViewRowAnimation;
Play to see which one you want. Even selecting UITableViewRowAnimationNone can sometimes have a good effect. Code update table below:
[self.tableView beginUpdates]; [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationNone]; [self.tableView endUpdates];
Jai Govindani Jan 29 '13 at 6:53 2013-01-29 06:53
source share