From 3f5b7b103e8cbca3948a6bdbbace7f80300fdc9d Mon Sep 17 00:00:00 2001 From: pera Date: Wed, 10 May 2017 11:39:00 -0300 Subject: [PATCH] Fixes #322 --- Sources/ButtonBarView.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Sources/ButtonBarView.swift b/Sources/ButtonBarView.swift index e4fabe8..8832aca 100644 --- a/Sources/ButtonBarView.swift +++ b/Sources/ButtonBarView.swift @@ -112,8 +112,7 @@ open class ButtonBarView: UICollectionView { targetContentOffset = fromContentOffset + ((toContentOffset - fromContentOffset) * progressPercentage) } - let animated = abs(contentOffset.x - targetContentOffset) > 30 || (fromIndex == toIndex) - setContentOffset(CGPoint(x: targetContentOffset, y: 0), animated: animated) + setContentOffset(CGPoint(x: targetContentOffset, y: 0), animated: false) } open func updateSelectedBarPosition(_ animated: Bool, swipeDirection: SwipeDirection, pagerScroll: PagerScroll) -> Void {