From fab9a846211d3121912f761c22b11eaa001da1df Mon Sep 17 00:00:00 2001 From: Glen Tregoning Date: Sun, 21 Sep 2014 14:00:12 -0700 Subject: [PATCH] Fixing compile warnings for 64-bit compilation and for deprecated [NSDateComponents setWeek:] usage --- Source/CKCalendarView.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/CKCalendarView.m b/Source/CKCalendarView.m index e79e5ac..7ca7407 100644 --- a/Source/CKCalendarView.m +++ b/Source/CKCalendarView.m @@ -79,7 +79,7 @@ - (void)setDate:(NSDate *)date { _date = date; if (date) { NSDateComponents *comps = [self.calendar components:NSDayCalendarUnit|NSMonthCalendarUnit fromDate:date]; - [self setTitle:[NSString stringWithFormat:@"%d", comps.day] forState:UIControlStateNormal]; + [self setTitle:[NSString stringWithFormat:@"%ld", (long)comps.day] forState:UIControlStateNormal]; } else { [self setTitle:@"" forState:UIControlStateNormal]; } @@ -289,7 +289,7 @@ - (void)layoutSubviews { NSDate *endDate = [self _firstDayOfNextMonthContainingDate:self.monthShowing]; if (!self.onlyShowCurrentMonth) { NSDateComponents *comps = [[NSDateComponents alloc] init]; - [comps setWeek:numberOfWeeksToShow]; + [comps setWeekOfMonth:numberOfWeeksToShow]; endDate = [self.calendar dateByAddingComponents:comps toDate:date options:0]; }