From 7a8cac909b048f6549ba933f3d8c1d953b87b274 Mon Sep 17 00:00:00 2001 From: Rex Date: Fri, 16 Mar 2018 14:39:42 +0800 Subject: [PATCH] Fix scrolling animation issue --- TYPagerControllerDemo/TYPagerController/TYPagerViewLayout.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TYPagerControllerDemo/TYPagerController/TYPagerViewLayout.m b/TYPagerControllerDemo/TYPagerController/TYPagerViewLayout.m index b716485..c36b35c 100644 --- a/TYPagerControllerDemo/TYPagerController/TYPagerViewLayout.m +++ b/TYPagerControllerDemo/TYPagerController/TYPagerViewLayout.m @@ -278,7 +278,7 @@ - (void)scrollToItemAtIndex:(NSInteger)index animate:(BOOL)animate { } [self scrollViewWillScrollToView:_scrollView animate:animate]; - [_scrollView setContentOffset:CGPointMake(index * CGRectGetWidth(_scrollView.frame),0) animated:NO]; + [_scrollView setContentOffset:CGPointMake(index * CGRectGetWidth(_scrollView.frame),0) animated:animate]; [self scrollViewDidScrollToView:_scrollView animate:animate]; }