项目介绍:
HcdDateTimePicker
https://github.com/Jvaeyhcd/HcdDateTimePicker
目前支持3种样式的时间选择器。
A beautiful DateTimePicker.
Requirements
- Xcode 6 or higher
- iOS 7.0 or higher
- ARC
InstallationManual InstallAll you need to do is drop HCDDateTimePicker files into your project, and add #include HCDDateTimePicker.h to the top of classes that will use it.
CocoapodsChange to the directory of your Xcode project:
$ cd /path/to/YourProject$ touch Podfile$ edit PodfileEdit your project’s Podfile and add the following:
pod ‘HcdDateTimePicker’Install into your Xcode project:
pod setuppod install
Example Usage[Objective-C] 查看源文件 复制代码
HcdDateTimePickerView *dateTimePickerView = [[HcdDateTimePickerView alloc] initWithDatePickerMode:DatePickerDateMode defaultDateTime:[[NSDate alloc]initWithTimeIntervalSinceNow:0]]; dateTimePickerView.clickedOkBtn = ^(NSString * datetimeStr){ NSLog(@"%@", datetimeStr); }; [self.view addSubview:dateTimePickerView]; [dateTimePickerView showHcdDateTimePicker];
DEMO直接下载: