Skip to content

kRadius/HYYCalendar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HYYCalendar

一个简单易用的日期的选择的控件,支持日历选择和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;
}

TODO

  • 国际化

License

MIT - Copyright (c) 2016 kRadius

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published