Latest | 1.1.1 |
---|---|
Homepage | https://github.com/gwikiera/GWInfinitePickerView |
License | MIT |
Platforms | ios 9.0, requires ARC |
Authors |
The GWInfinitePickerView is an extension of the UIPickerView which makes it endless (like UIDatePicker).
Usage
The GWInfinitePickerView
inherited from UIPickerView
, so all you have to do is just change the class of your picker view to the GWInfinitePickerView. All the magic is under the hood, outside it seems to be normal UIPickerView
, so you don’t have to change your existing UIPickerView
, UIPickerViewDataSource
and UIPickerViewDelegate
implementation.
let dataSource: UIPickerViewDelegate = ...
let delegate: UIPickerViewDelegate = ...
// Instead of UIPickerView
// let pickerView = UIPickerView()
// just create GWInfinitePickerView
// GWInfinitePickerView
let pickerView = GWInfinitePickerView()
// and then assign dataSource and delegate as usuall
pickerView.dataSource = dataSource
pickerView.delegate = delegate
Or you can set up it in Interface Builder:
Installation
CocoaPods
GWInfinitePickerView
is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod "GWInfinitePickerView"
Carthage
To integrate GWInfinitePickerView
into your Xcode project using Carthage, specify it in your Cartfile
:
github "gwikiera/GWInfinitePickerView" ~> 1.1.0
Author
Grzegorz Wikiera, [email protected]
License
GWInfinitePickerView is available under the MIT license. See the LICENSE file for more info.
Latest podspec
{ "name": "GWInfinitePickerView", "version": "1.1.1", "summary": "The GWInfinitePickerView is an extension of the UIPickerView which makes it endless (like UIDatePicker).", "description": "The GWInfinitePickerView by adding additional rows makes UIPickerView endless. All the magic is under the hood, outside it seems to be normal UIPickerView. The GWInfinitePickerView inherited from UIPickerView, so all you have to do is just change the class of your picker view to the GWInfinitePickerView.", "homepage": "https://github.com/gwikiera/GWInfinitePickerView", "license": "MIT", "authors": { "Grzegorz Wikiera": "[email protected]" }, "source": { "git": "https://github.com/gwikiera/GWInfinitePickerView.git", "tag": "1.1.1" }, "platforms": { "ios": "9.0" }, "requires_arc": true, "source_files": "GWInfinitePickerView/*.{h,m}", "public_header_files": [ "GWInfinitePickerView/GWInfinitePickerView.h", "GWInfinitePickerView/GWInfinitePickerViewDelegate.h" ] }
Tue, 23 Oct 2018 00:00:11 +0000