- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
//Selected index's color changed. static float newx = 0; static float oldIx = 0; newx= scrollView.contentOffset.x ; if (newx != oldx ) { //Left-YES,Right-NO if (newx > oldx) { self.scrollLeftOrRight = NO; }else if(newIndex < oldIndex){ self.scrollLeftOrRight = YES; } oldx = newx; } } |
|
判断ScrollView滑动的方向
最新推荐文章于 2021-11-11 16:43:17 发布