Not sure when you shoot an animation and do it loop (for example, using a UIActivityView counter or something else) - does each pixel viewed in a table sound?
In any case, perhaps you could use the UIScrollView delegation methods and tell each cell about the start of the animation on scrollViewWillBeginDragging: and tell each cell about the completion in scrollViewDidEndDragging:
You can set boolean isAnimating for your UITableViewCell , and if the animation is currently running, do nothing.
if (isAnimating) { // ... do nothing } else { // Start your animation }
Or stick with what you have now and use boolean, but only tan the animation if it does not currently enliven. Then in your finished parameter just set isAnimating to NO .
if (isAnimating) { // ... do nothing } else { [UIView animateWithDuration:0.3f animations:^{ // animations... isAnimating = YES; } completion:^{ isAnimating = NO; } ]; }
source share