We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I added the following code to CKCalendarView to create an event for a specific date.
-(void)setEventForDate:(NSDate *)date isHoliday:(BOOL)holiday withTitle:(NSString *)title{ // NSLog(@"Date received for event %@", date); for (DateButton *dateButton in self.dateButtons) { if (dateButton.date) { NSLog(@"%@", dateButton.date); if ([date isEqualToDate:dateButton.date]) { NSLog(@"Matched date %@", dateButton.date); UIColor *eventColor; UIColor *textColor; if (holiday) { eventColor = [UIColor grayColor]; textColor = [UIColor whiteColor]; } else { eventColor =[UIColor colorWithRed:0.557 green:0.137 blue:0.267 alpha:1]; textColor = [UIColor whiteColor]; } UILabel *eventTitle = [[UILabel alloc] initWithFrame:CGRectMake(0, dateButton.frame.size.height - 15, dateButton.frame.size.width, 15)]; [eventTitle setNumberOfLines:0]; [eventTitle setText:title]; [eventTitle setTextColor: textColor]; [eventTitle setBackgroundColor:eventColor]; [eventTitle setAdjustsFontSizeToFitWidth:YES]; [eventTitle setTextAlignment:NSTextAlignmentCenter]; [dateButton addSubview:eventTitle]; } } } }
The trouble I am having is that the the view shows in the cell the day before the correct date.
For example, if date passed in is 10/20/2013, the UILabel appears in the cell for 10/19, even though the debugger shows that the dateButton is 10/20.
I've narrowed it down to onlyShowCurrentMonth. If set to YES, the view appears in the correct cell otherwise it shows up in the day before.
The text was updated successfully, but these errors were encountered:
in this what is the date button ?
Sorry, something went wrong.
and what is the date buttons array?
No branches or pull requests
I added the following code to CKCalendarView to create an event for a specific date.
The trouble I am having is that the the view shows in the cell the day before the correct date.
For example, if date passed in is 10/20/2013, the UILabel appears in the cell for 10/19, even though the debugger shows that the dateButton is 10/20.
I've narrowed it down to onlyShowCurrentMonth. If set to YES, the view appears in the correct cell otherwise it shows up in the day before.
The text was updated successfully, but these errors were encountered: