This problem confused me a lot.
selectedDate is also a object of NSDate.
if I delete the line at mark1, this project will run normally.
if not, this project will down after I call this method.
where is the problem?
Thanks a lot!
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;
You don’t need to release it, it is an
autoreleaseobject. Usually you only release stuff youalloced orcopyed yourself.