欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

判断scrlloview是否是向下滑动的

程序员文章站 2024-01-27 11:11:40
...

#pragma mark 判断页面是否是向下滑动的

-(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {

    CGPoint translation = [scrollView.panGestureRecognizer translationInView:scrollView.superview];

    if (translation.y>0) {

        [[NSNotificationCenterdefaultCenter]postNotificationName:@"downKeyWord"object:nil];

    }

 

}