很常用的一个功能,就记录下来了。
-(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
historyY = scrollView.contentOffset.y;
} -(void)scrollViewDidScroll:(UIScrollView *)scrollView { if (scrollView.contentOffset.y<historyY) {
NSLog(@"down"); } else if (scrollView.contentOffset.y>historyY) {
NSLog(@"up"); }
}