FreshDate
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Requirements
Installation
FreshDate is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'FreshDate'
Usage
- Import the library
import UIKit
import FreshDate
class ViewController: UIViewController {
}
- Setup
- Picker between today and 100 years from now:
let datePicker = FreshDate()
datePicker.setup() {date in
// process result
print("\(date)")
}
- Picker with minimum and maximum dates:
datePicker.setup(min: minDate, max: maxDate) { (date) in
// process result
print("\(date)")
}
- Display
- Screen Center:
datePicker.display(in: self)
- Or as Popover:
datePicker.displayPopOver(on: button, in: self)
Author
amirshayegh, [email protected]
License
FreshDate is available under the MIT license. See the LICENSE file for more info.