高度自定义日历控件(For iOS)

jopen 6年前

NHCalendarPro

高度自定义日历控件(For iOS)

image

使用方法:

CGRect infoRect = CGRectMake(0, curY, screenWD, screenWD);  _calendar = [[NHCalender alloc] initWithFrame:infoRect];  _calendar.delegate = self;  _calendar.dataSource = self;  _calendar.calendarDate = [NSDate date];  _calendar.currentMonth = [NSDate date];  _calendar.borderSelectColor = [UIColor blackColor];  [self.view addSubview:_calendar];

如果某一天有事件需要标注,则在委托方法:

- (UIColor *)titleColorForDate:(NSDate *)date;  - (UIColor *)borderColorForDate:(NSDate *)date;  - (UIColor *)backgroundColorForDate:(NSDate *)date;

中自定义。

项目主页:http://www.open-open.com/lib/view/home/1440312321380