To run the example project; clone the repo, and run pod install
from the Example directory first.
All you need to use this in your app is:
LIYDateTimePickerViewController *vc = [LIYDateTimePickerViewController timePickerForDate:[NSDate date] delegate:self];
[self.navigationController pushViewController:vc animated:YES];
And implement the LIYDateTimePickerDelegate
:
- (void)dateTimePicker:(LIYDateTimePickerViewController *)dateTimePickerViewController didSelectDate:(NSDate *)selectedDate {
NSLog(@"Selected date: %@", [selectedDate description]);
[self.navigationController popViewControllerAnimated:YES];
}
LIYDateTimePicker requires either iOS 7.x and above.
Simply add the following lines to your Podfile:
pod 'JTCalendar', :git => 'https://github.com/kgellci/JTCalendar.git', :branch => 'master' # This must be placed before LIYDateTimePicker
pod 'LIYDateTimePicker', :git => 'https://github.com/lyahdav/LIYDateTimePicker.git'
Liron Yahdav
LIYDateTimePicker is available under the MIT license. See the LICENSE file for more info.
Thanks to Icons8 for the Checklist icon