tags:

views:

319

answers:

1

I want to do a series of things in reaction to the end of certain UITableView animations. For example, I want the table view cell to highlight (via selectRowAtIndexPath) after it has been scrolled to via scrollToRowAtIndexPath.

How can this be done?

+1  A: 

Well if you want to perform an action once the scrollToRowAtIndexPath has been fired.

- (void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated

You need to create a CAAnimation pointer like

CAAnimation *myAnimation;

Then set the delgate to self

myAnimation.delegate = self;

Once you do that, these following delegate methods should activate where you can put your code:

- (void)animationDidStart:(CAAnimation *)theAnimation

- (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag
Brock Woolf