ArrowPickerView provides nice way for selecting dropdown items when filling form.
- iOS10
ArrowPickerView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "ArrowPickerView"
import ArrowPickerView
let arrowPickerView = ArrowPickerView(rootView: self.view, delegate: self)
arrowPickerView.apperance.color = UIColor.green
let pickerArray = ["1", "2", "3", "4", "5"]
arrowPickerView.show(pickerArray: pickerArray, inButton: sender)
extension ViewController: ArrowPickerViewDelegate {
func arrowPickerDone(row: Int, button: UIButton) {
}
func arrowPickerDidSelectRow(row: Int, button: UIButton) {
}
}
var width: Int
var height: Int
var topBarHeight: Int
var arrowWidth: Int
var arrowHeight: Int
var color: UIColor
var coverViewColor: UIColor
var doneButtonText: String
var labelAttributedParameters: [NSAttributedStringKey: Any]
var placeHolder: String?
var isNavigationControllerVisible: Bool
var spaceBetweenSelectedButtonAndSuperViewTop: Int
var spaceBetweenPickerAndSelectedButton: Int
When using this widget inside scrollView, please make sure you select View for your top constraint, see the below:
An example project is included with this repo. To run the example project, clone the repo and run.
David Tomić
ArrowPickerView is available under the MIT license. See the LICENSE file for more info.