ADDatePicker is Horizontal Date Picker Library written in Swift
- iOS 10.0+
- Xcode 10.0+
- Swift 4.2+
- If you found a bug, open an issue.
- If you have a feature request, open an issue.
- If you want to contribute, submit a pull request.
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
CocoaPods 1.1+ is required
To integrate ADDatePicker into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target '<Your Target Name>' do
pod 'ADDatePicker'
end
Then, run the following command:
$ pod install
- First, set Custom Class of UIView to ADDatePicker...
..And That's it., you can run the project now. it's that simple. ;]
Customize with ease..!
"Listen up, Dave. Your code is poor and colour choices are even poorer. this doesn't look good"
"Calm Down Joe, I gotchu.."
@IBOutlet weak var datePicker: ADDatePicker!
datePicker.yearRange(inBetween: 1990, end: 2022)
datePicker.intialDate = Date()
//set BackGround Color of DatePicker
datePicker.bgColor = .blue
//set Selection and Deselection Background Colors
datePicker.deselectedBgColor = .clear
datePicker.selectedBgColor = .white
//set Selection and Deselection Text Colors
datePicker.selectedTextColor = .black
datePicker.deselectTextColor = UIColor.init(white: 1.0, alpha: 0.7)
Currently, there are three selectionType available. you're most welcome to contribute if you want to extand this list.
enum SelectionType {
case square
case roundedsquare
case circle
}
You can change selector by writing this piece of code.
datePicker.selectionType = .circle
Now, You can confirm to Delegate method to access date on scroll
datePicker.delegate = self
func ADDatePicker(didChange date: Date)
Which allows you to get new date on every scroll.
ADDatePicker is developed under observation of the great minds of Space-O Technology
ADDatePicker is released under the MIT license. See License for details.