iOS UIScrollView UITableView UICollectionView判断滑动停止


- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
    BOOL scrollToScrollStop = !scrollView.tracking && !scrollView.dragging && !scrollView.decelerating;
        if (scrollToScrollStop) {
            [self scrollViewDidEndScroll];
        }
}

- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {
    if (!decelerate) {
        // 停止类型3
        BOOL dragToDragStop = scrollView.tracking && !scrollView.dragging && !scrollView.decelerating;
        if (dragToDragStop) {
            [self handlePlayView];
        }
    }
}

- (void)scrollViewDidEndScroll {
    NSLog(@"--already-stop---");
}

你可能感兴趣的:(iOS UIScrollView UITableView UICollectionView判断滑动停止)