这个问题困惑了我很多。 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;