我正在展示 TKCalendarMonthView ,但我在dateSelected方面遇到了一些问题。
这是代码:
- (void)calendarMonthView:(TKCalendarMonthView *)monthView didSelectDate:(NSDate *)date
{
NSDate *now = [NSDate date];
NSLog(@"DidSelectDate %@ %@", date, now);
}
-(void)testCalendar
{
NSTimeZone* aTimeZone= [NSTimeZone systemTimeZone];
TKCalendarMonthView *aMonthViewController= [[TKCalendarMonthView alloc]initWithSundayAsFirst:NO timeZone:aTimeZone];
NSDate * aDate= [NSDate date];
[aMonthViewController setDelegate:self];
[aMonthViewController selectDate:aDate];
NSLog(@"SelectDate %@ %@", aMonthViewController.dateSelected, aMonthViewController.timeZone.name);
NSLog(@"SelectDate %@ %@", aDate, aTimeZone.name);
}
这是日志:
SelectDate 2013-07-04 22:00:00 +0000欧洲/罗马
SelectDate 2013-07-05 08:53:33 +0000欧洲/罗马
DidSelectDate 2013-07-26 22:00:00 +0000 2013-07-05 08:53:34 +0000
怎么了?
由于