功能分类:生活
支持平台:iOS
运行环境:iOS
开发语言:Object-c
开发工具: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;
- }