Add an instance variable, set it to the offset you saw in the last call to scrollViewDidScroll: and use it to decide if you want to animate:
// Instance variable CGPoint lastOffset; ... - (void)scrollViewDidScroll:(UIScrollView *)scrollView { ... if (lastOffset.x < 160 && scrollView.contentOffset.x >= 160) { //animate Image } lastOffset = scrollView.contentOffset; }
This will allow you to animate the image every time the scroll view crosses from 160 to 160.
source share