我有以下代码,我正在比较两个字符串,但它抛出异常。
- (void)calendarMonthView:(TKCalendarMonthView *)monthView didSelectDate:(NSDate *)d {
NSLog(@"calendarMonthView didSelectDate %@",d);
//[self papulateTable];
//[table reloadData];
//[self performSelector:@selector(papulateTable) withObject:nil afterDelay:1.0];
NSString *tempDate = (NSString*)d;
NSString *selectedDate = @"2013-02-04 00:00:00 +0000";
if([tempDate isEqualToString:selectedDate])
{
flagtoCheckSelectedCalendarDate = 1;
}
if(flagtoCheckSelectedCalendarDate == 1)
{
[self viewDidLoad];
}
if(flagtoCheckSelectedCalendarDate == 2)
{
[self viewDidLoad];
}
//[table reloadData];
}
任何人都可以请建议。谢谢。