I'm using MBCalendarKit for customising calendar. I want to add to text labels in each calendar cell. For reference download sample code from github "https://github.com/MosheBerman/MBCalendarKit".
Edit:
To make multiple labels I used a for loop. What's wrong?
NSMutableArray *dateButtons = [NSMutableArray array];
for (NSInteger i = 1; i <= 42; i++) {
DateButton *dateButton = [DateButton buttonWithType:UIButtonTypeCustom];
dateButton.calendar = self.calendar;
[dateButton addTarget:self action:@selector(_dateButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
UILabel *travelTime = [[UILabel alloc] initWithFrame:CGRectMake(3, 23, 20, 20)];
travelTime.font=[travelTime.font fontWithSize:9];
[travelTime setTextColor:[UIColor blueColor]];
travelTime.text = @"9";
UILabel *workTime = [[UILabel alloc] initWithFrame:CGRectMake(30, 23, 20, 20)];
workTime.font=[workTime.font fontWithSize:9];
[workTime setTextColor:[UIColor orangeColor]];
workTime.text = @"9";
[dateButton addSubview:travelTime];
[dateButton addSubview:workTime];
[dateButtons addObject:dateButton];
}
self.dateButtons = dateButtons;