【发布时间】:2011-08-22 16:19:43
【问题描述】:
谁能解释一下为什么这段代码可以完美运行:
int thumbnailPrefix = trunc([newGraph.dateCreated timeIntervalSinceReferenceDate]);
newGraph.thumbnailImageName = [NSString stringWithFormat:@"%d.%@",thumbnailPrefix,@"png"];
但是这段代码会导致 Bad Access 错误?
newGraph.thumbnailImageName = [NSString stringWithFormat:@"%d.%@",trunc([newGraph.dateCreated timeIntervalSinceReferenceDate]),@"png"];
【问题讨论】:
标签: objective-c ios exc-bad-access stringwithformat