有人可以概述一下这条线到底是做什么的吗?
[self.delegate calendar:self didSelectDate:self.selectedDate];
该行基本上用于在另一个类中的标签 dateLabel 上设置日期。
CKCalendarView *calendar = [[CKCalendarView alloc] initWithStartDay:startMonday];
calendar.delegate = self;
self.dateFormatter = [[NSDateFormatter alloc] init];
[self.dateFormatter setDateFormat:@"dd/MM/yyyy"];
calendar.selectedDate = [self.dateFormatter dateFromString:@"18/11/2012"];
calendar.minimumDate = [self.dateFormatter dateFromString:@"09/11/2012"];
calendar.maximumDate = [self.dateFormatter dateFromString:@"29/11/2012"];
calendar.frame = CGRectMake(10, 10, 300, 320);
[self.view addSubview:calendar];
self.dateLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, CGRectGetMaxY(calendar.frame) + 4, self.view.bounds.size.width, 24)];
[self.view addSubview:self.dateLabel];
关于上述行的作用的“夫妇行”详细解释将有很大帮助。