iOS源碼:展示事件的年日歷
作者:佚名
iOS顯示年日歷,可以展示標注的事件。
功能分類:生活
支持平臺:iOS
運行環(huán)境:iOS
開發(fā)語言:Object-c
開發(fā)工具:Xcode
源碼大小:103.78KB
源碼下載地址:http://down.51cto.com/data/1982905
源碼簡介
iOS顯示年日歷,可以展示標注的事件。
源碼運行截圖
運行圖
源碼片段
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- static NSString *yearTableCellId = @"YearTableCellId";
- INOYearTableCell *cell = [tableView dequeueReusableCellWithIdentifier:yearTableCellId];
- if (!cell) {
- cell = [[INOYearTableCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:yearTableCellId];
- [cell setTag:indexPath.row];
- }
- NSDate *yearDate = [_model yearWithOffsetFromCurrentDate:indexPath.row + kHalfCellsCount * (_offset - 1)];
- [cell setupWithYearDate:yearDate];
- [_model makeMonthsImagesWithDate:yearDate ofSize:[INOYearTableCell monthViewSize]
- cancelTag:[cell tag]
- completion: ^(BOOL success, NSArray *monthsImages) {
- if (success && [monthsImages count] > 0) {
- [cell setupWithMonthsImages:monthsImages];
- }
- }];
- return cell;
- }
責任編輯:閆佳明
來源:
網絡整理