1

In -tableView:heightForRowAtIndexPath: I'm changing the height for a cell dynamically during usage of the table. But I don't want this to happen like BAAANNGGG..., I want it nicely animated. Where would I put the animation block? Would that go just around the -reloadData call?

Well, at least this does nothing:

[UIView beginAnimations:@"foo" context:nil];
[UIView setAnimationDuration:3];
[self.table reloadData];
[UIView commitAnimations];

don't get any animation here...

1 Answer 1

2

Potentially the following is a better option if you're on iOS 3.0 and up:

[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationNone];

Change the animation to match your preference of course...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.