Skip to content

Commit

Permalink
Add toggle for enabling invisible scrollview (#1)
Browse files Browse the repository at this point in the history
* Add toggle for enabling invisible scrollview

* Fix compiler error
  • Loading branch information
alex tran authored Jan 28, 2019
1 parent 29ae6fd commit 164949a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ScalingCarousel/Classes/ScalingCarouselView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 164949a

Please sign in to comment.