這個問題困惑了我很多。 selectedDate也是NSDate的一個對象。 如果我刪除mark1上的行,該項目將正常運行。如果不是,則在我調用此方法後,此項目將會關閉。 問題在哪裏? 非常感謝!我是否正確釋放對象?
NSDate *selectedData_c = [self.selectedDate dateByAddingTimeInterval:60 * 60 * 8];
self.label = (UILabel *)[nibLoadedCell viewWithTag:1];
label.text = [NSString stringWithFormat:@"%@-%@-%@",[[selectedData_c description] substringWithRange:yearRange],[[selectedData_c description] substringWithRange:monthRange],[[selectedData_c description] substringWithRange:dayRange]];
[selectedData_c release]; // mark1
return cell;