一个简单易用的日期的选择的控件,支持日历选择和Picker选择两种方式。支持iOS 6+
##用法
#import "HYYCalendar.h"
#import "HYYCalendar+Helper.h"
HYYCalendar *calendar = [[HYYCalendar alloc] initWithFrame:self.navigationController.view.bounds number:self.number unit:self.unit type:HYYCalendarTypeCollection];
calendar.delegate = self;
[self.navigationController.view addSubview:calendar];
[calendar show];
#pragma mark - HYYCalendarDelegate
- (void)calendar:(HYYCalendar *)calendar didSelectDate:(NSDate *)date number:(NSUInteger)number unit:(HYYCalendarUnit)unit {
self.number = number;
self.unit = unit;
NSString *dateString = [[NSString stringWithFormat:@"%ld%@后", number, [calendar unitStringWithUnit:unit]] stringByAppendingFormat:@"(%@)", [date dateStringWithFormat:@"yyyy-MM-dd"]];
self.selectedDateLabel.text = dateString;
}
- 国际化
MIT - Copyright (c) 2016 kRadius