So I have this line of code:
[tableView setContentOffset:point animated:YES];
and I want to run another piece of code after the animation ends. My a
You can create animations and tell them directly to perform a block after they're done.
Here's an alternative that may play nicer with the UITableView's animations.
[UIView beginAnimations:nil context:sender];
[UIView setDelegate:self];
[UIView setDidStopSelector:@selector(scrollMethod:)];
[tableView setContentOffset:point];
[UIView commitAnimations];
And make sure to implement your scrollMethod:
with this signature:
- (void)scrollMethod:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context
You can use the context to know which sender
you have. Read the UIView docs for more on UIView animations.