我有以下代码
NSDate * selectedDate = self.datePicker.date;
NSLog(@"The date selected is %@ and initialdate is %@", selectedDate, initialDate);
NSLog(@"the expression value is %i", [self.initialDate isEqualToDate:selectedDate]);
打印以下内容
The date selected is 2012-09-24 18:49:04 +0000 and initialdate is 2012-09-24 18:49:04 +0000
the expression value is 0
我正在使用 xcode4.5 并针对 ios6。xcode4.4 中的相同代码打印1
(它们是相等的)