Skip to content

Commit

Permalink
adds variable scroll speed [issue filipealva#26]
Browse files Browse the repository at this point in the history
  • Loading branch information
acegreen committed Aug 13, 2017
1 parent 00d1f5f commit 20d98f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Pod/Classes/PickerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ open class PickerView: UIView {
lazy var collectionView: UICollectionView = {
self.layout.estimatedItemSize = CGSize(width: self.rowHeight, height: self.rowHeight)
let collectionView = UICollectionView(frame: .zero, collectionViewLayout: self.layout)
collectionView.decelerationRate = self.scrollSpeed

return collectionView
}()
Expand Down Expand Up @@ -221,6 +222,8 @@ open class PickerView: UIView {
}
}

open var scrollSpeed: CGFloat = UIScrollViewDecelerationRateNormal

// MARK: Initialization

required public init?(coder aDecoder: NSCoder) {
Expand Down

0 comments on commit 20d98f0

Please sign in to comment.