1.scrollView及其子类tableView,collectionView,不可以使用touch以及手势.
2.可以使用代理判断滑动的方向
#import "tableVC.h"
@interface tableVC()<UIScrollViewDelegate>
@property (assign, nonatomic)CGFloat lasty;
@end
@implementation tableVC
-(void)scrollViewDidScroll:(UIScrollView *)scrollView{
if (scrollView.contentOffset.y>self.lasty) {
NSLog(@"向上");
}else if(scrollView.contentOffset.y<self.lasty){
NSLog(@"向下");
}
self.lasty=scrollView.contentOffset.y;
}
@end
其他:
1.因为scrollView阻止了touch属性(有待深究) 也有方法实现.