When the user taps a UITableViewCell I want an image in that cell to make a little bouncing animation to provide user feedback. That animation works exactly like I want except it is not always triggered when I'm tapping a cell. I'm using Facebook POP animation framework.
#import <POP/POP.h>
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
MyCustomCell *cell = [tableView dequeueReusableCellWithIdentifier:@"customcell" forIndexPath:indexPath];
POPSpringAnimation *scaleAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewScaleXY];
scaleAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(1,1)];
scaleAnimation.velocity = [NSValue valueWithCGPoint:CGPointMake(5,5)];
scaleAnimation.springBounciness = 20.f;
[cell.bounceimage pop_addAnimation:scaleAnimation forKey:@"scaleAnimation"];
}
Do I need to reset the animation each time a cell is tapped, or anything else I'm missing?
Thanks in advance