There's a set of methods in UITableView for animated table updates. All the insert/delete/road calls should be within a beginUpdates/ endUpdates block.

- (void)beginUpdates; // allow multiple insert/delete of rows and sections to be animated simultaneously. Nestable - (void)endUpdates; // only call insert/delete/reload calls inside an update block. otherwise things like row count, etc. may be invalid.

- (void)insertSections:(NSIndexSet *)sections withRowAnimation: (UITableViewRowAnimation)animation; - (void)deleteSections:(NSIndexSet *)sections withRowAnimation: (UITableViewRowAnimation)animation; - (void)reloadSections:(NSIndexSet *)sections withRowAnimation: (UITableViewRowAnimation)animation __OSX_AVAILABLE_STARTING (__MAC_NA,__IPHONE_3_0);

- (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation: (UITableViewRowAnimation)animation; - (void)deleteRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation: (UITableViewRowAnimation)animation; - (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation: (UITableViewRowAnimation)animation __OSX_AVAILABLE_STARTING (__MAC_NA,__IPHONE_3_0);

Luke

On Dec 11, 2009, at 3:53 AM, Philip Vallone wrote:


Hi List,

I have a table that gets reloaded when a user presses a button. Is it possible to animate reloadData and if so can you point me in the right direction?

Thanks

Phil

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/luketheh%40apple.com

This email sent to [email protected]

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to