From e0ee36dd15ab4af07747e4d8c93124abfec23d49 Mon Sep 17 00:00:00 2001 From: Marco Pompei Date: Tue, 2 May 2017 14:41:44 -0500 Subject: [PATCH] Fixed wrong signature for layoutAttributesForElements(in:). --- AKPickerView/AKPickerView.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AKPickerView/AKPickerView.swift b/AKPickerView/AKPickerView.swift index c8370c2..f9ecbdb 100644 --- a/AKPickerView/AKPickerView.swift +++ b/AKPickerView/AKPickerView.swift @@ -165,13 +165,13 @@ private class AKCollectionViewLayout: UICollectionViewFlowLayout { return nil } - - private func layoutAttributesForElementsInRect(_ rect: CGRect) -> [AnyObject]? { + + override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? { switch self.delegate.pickerViewStyleForCollectionViewLayout(self) { case .flat: return super.layoutAttributesForElements(in: rect) case .wheel: - var attributes = [AnyObject]() + var attributes = [UICollectionViewLayoutAttributes]() if self.collectionView!.numberOfSections > 0 { for i in 0 ..< self.collectionView!.numberOfItems(inSection: 0) { let indexPath = IndexPath(item: i, section: 0)