From b6a0ac15b67aa787e0460a55667c9e013a565277 Mon Sep 17 00:00:00 2001 From: Andrea Bizzotto Date: Sat, 9 Jan 2016 08:20:50 +0000 Subject: [PATCH] Fix for animation bug in setCurrentPageIndex --- MVCarouselCollectionView/MVCarouselCollectionView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MVCarouselCollectionView/MVCarouselCollectionView.swift b/MVCarouselCollectionView/MVCarouselCollectionView.swift index 497fe4f..cb788e7 100644 --- a/MVCarouselCollectionView/MVCarouselCollectionView.swift +++ b/MVCarouselCollectionView/MVCarouselCollectionView.swift @@ -172,7 +172,7 @@ public class MVCarouselCollectionView: UICollectionView, UICollectionViewDataSou self.clientDidRequestScroll = true; let indexPath = NSIndexPath(forRow: currentPageIndex, inSection: 0) - self.scrollToItemAtIndexPath(indexPath, atScrollPosition:UICollectionViewScrollPosition.CenteredHorizontally, animated:true) + self.scrollToItemAtIndexPath(indexPath, atScrollPosition:UICollectionViewScrollPosition.CenteredHorizontally, animated: animated) }