高度自定義日歷控件(For iOS)

jopen 9年前發布 | 13K 次閱讀 IOS iOS開發 移動開發

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.baiduhome.net/lib/view/home/1440312321380

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!