From 164949a8684ccbed9e266f37a3b0857d27ca7dc9 Mon Sep 17 00:00:00 2001 From: alex tran Date: Mon, 28 Jan 2019 17:39:42 -0500 Subject: [PATCH] Add toggle for enabling invisible scrollview (#1) * Add toggle for enabling invisible scrollview * Fix compiler error --- ScalingCarousel/Classes/ScalingCarouselView.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ScalingCarousel/Classes/ScalingCarouselView.swift b/ScalingCarousel/Classes/ScalingCarouselView.swift index 5209a6e..24692c6 100644 --- a/ScalingCarousel/Classes/ScalingCarouselView.swift +++ b/ScalingCarousel/Classes/ScalingCarouselView.swift @@ -166,6 +166,14 @@ open class ScalingCarouselView: UICollectionView { self.didScroll() } } + + /* + This method should ALWAYS be called from the ScalingCarousel delegate when you want to + disable the invisible scroller. + */ + public func toggleInvisibleScrolling(_ toggle: Bool) { + self.invisibleScrollView.isScrollEnabled = toggle + } } private typealias PrivateAPI = ScalingCarouselView