From 417a9f47f99da27ea836afdd7228a3ac9b9c721d Mon Sep 17 00:00:00 2001 From: Mihai Rustiuc Date: Sat, 30 Apr 2016 13:44:39 +0300 Subject: [PATCH 1/2] Added call to `willBeginDragging` --- AKPickerView/AKPickerView.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AKPickerView/AKPickerView.swift b/AKPickerView/AKPickerView.swift index 417c783..8819570 100644 --- a/AKPickerView/AKPickerView.swift +++ b/AKPickerView/AKPickerView.swift @@ -589,6 +589,10 @@ public class AKPickerView: UIView, UICollectionViewDataSource, UICollectionViewD self.didEndScrolling() } } + + public func scrollViewWillBeginDragging(scrollView: UIScrollView) { + self.delegate?.scrollViewWillBeginDragging?(scrollView) + } public func scrollViewDidScroll(scrollView: UIScrollView) { self.delegate?.scrollViewDidScroll?(scrollView) From e528376e0e0329ffd89cfd40edb82ab895914e97 Mon Sep 17 00:00:00 2001 From: Mihai Rustiuc Date: Sat, 30 Apr 2016 14:42:06 +0300 Subject: [PATCH 2/2] Added bouncing --- AKPickerView/AKPickerView.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/AKPickerView/AKPickerView.swift b/AKPickerView/AKPickerView.swift index 8819570..abd8dea 100644 --- a/AKPickerView/AKPickerView.swift +++ b/AKPickerView/AKPickerView.swift @@ -251,6 +251,13 @@ public class AKPickerView: UIView, UICollectionViewDataSource, UICollectionViewD /// Readwrite. A float value which indicates the spacing between cells. @IBInspectable public var interitemSpacing: CGFloat = 0.0 + + // Readwrite. A boolean that decides whether the component should bounce or not. True by default. + public var bounces = true { + didSet { + self.collectionView.bounces = self.bounces + } + } /// Readwrite. The style of the picker view. See AKPickerViewStyle. public var pickerViewStyle = AKPickerViewStyle.Wheel