diff --git a/TYPagerControllerDemo.xcodeproj/project.xcworkspace/xcuserdata/chenjiahao.xcuserdatad/UserInterfaceState.xcuserstate b/TYPagerControllerDemo.xcodeproj/project.xcworkspace/xcuserdata/chenjiahao.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..f2ab798 Binary files /dev/null and b/TYPagerControllerDemo.xcodeproj/project.xcworkspace/xcuserdata/chenjiahao.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/TYPagerControllerDemo.xcodeproj/xcuserdata/chenjiahao.xcuserdatad/xcschemes/xcschememanagement.plist b/TYPagerControllerDemo.xcodeproj/xcuserdata/chenjiahao.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..bb7d043 --- /dev/null +++ b/TYPagerControllerDemo.xcodeproj/xcuserdata/chenjiahao.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + TYPagerControllerDemo.xcscheme + + orderHint + 0 + + + + diff --git a/TYPagerControllerDemo/TYPagerController/TYPagerViewLayout.m b/TYPagerControllerDemo/TYPagerController/TYPagerViewLayout.m index 7b97f43..e4cca27 100644 --- a/TYPagerControllerDemo/TYPagerController/TYPagerViewLayout.m +++ b/TYPagerControllerDemo/TYPagerController/TYPagerViewLayout.m @@ -272,7 +272,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]; }