I have a UICollectionView. I want to detect scroll direction. I have a two different animation style for scroll down and scroll up. So I must learn scroll direction.
CGPoint scrollVelocity = [self.collectionView.panGestureRecognizer
velocityInView:self.collectionView.superview];
if (scrollVelocity.y > 0.0f)
NSLog(@"scroll up");
else if(scrollVelocity.y < 0.0f)
NSLog(@"scroll down");
This is just work at finger touched. Not work for me