Latest 1.0.2
Homepage https://github.com/priore/DPPickerManager
License MIT
Platforms ios 10.0, requires ARC
Frameworks UIKit
Authors

CI Status
Version
License
[Language]()
[Supports]()
Platform

Twitter: @DaniloPriore
Documentation

UIPicker inside a UIAlertController

DPPickerManager

HOW TO USE :


// Strings Picker
let values = ["Value 1", "Value 2", "Value 3", "Value 4"]
DPPickerManager.shared.showPicker(title: "Strings Picker", selected: "Value 1", strings: values) { (value, index, cancel) in
    if !cancel {
        // TODO: you code here
        debugPrint(value as Any)
    }
}
// Date Picker
let min = Date()
let max = min.addingTimeInterval(31536000) // 1 year
DPPickerManager.shared.showPicker(title: "Date Picker", selected: Date(), min: min, max: max) { (date, cancel) in
    if !cancel {
        // TODO: you code here
        debugPrint(date as Any)
    }
}
// Time Picker (custom picker)
DPPickerManager.shared.showPicker(title: "Time Picker", picker: { (picker) in
    picker.date = Date()
    picker.datePickerMode = .time
}) { (date, cancel) in
    if !cancel {
        // TODO: you code here
        debugPrint(date as Any)
    }
}

Latest podspec

{
    "name": "DPPickerManager",
    "version": "1.0.2",
    "summary": "UIPicker inside a UIAlertController.",
    "homepage": "https://github.com/priore/DPPickerManager",
    "license": "MIT",
    "authors": {
        "Danilo Priore": "[email protected]"
    },
    "source": {
        "git": "https://github.com/priore/DPPickerManager.git",
        "tag": "1.0.2"
    },
    "social_media_url": "https://twitter.com/danilopriore",
    "platforms": {
        "ios": "10.0"
    },
    "requires_arc": true,
    "frameworks": "UIKit",
    "source_files": "DPPickerManager/Class/*.swift",
    "resources": "DPPickerManager/Resources/**/*"
}

Pin It on Pinterest

Share This