I was looking for a few things in stackoverflow for example
CGFloat pageWidth = scrollView.frame.size.width; int pageNumberToBeScrolled = floor((scrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1; if (pageNumberToBeScrolled != 1) {
in
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate;
But this only works if I scroll slowly, so the page scroll definitely moves halfway. This does not work if I scroll quickly as I swipe my finger across the screen. I just scrolled like a 30% page scroll, which does not satisfy the situation there, but it scrolls to the next page, and I want to find it.
How can I detect or catch all scroll-to-next-page situations? Please help me:)
EDIT
I am working on this because I want to play a sound effect while scrolling to the next page. I have to detect right after my finger from the screen and only to scroll the next page. I think that if I handle this on scrollViewDidEndDragging , that would be better for me :)
source share