【发布时间】:2012-05-09 07:47:48
【问题描述】:
哪个调用是正确的?似乎两个调用都有相同的结果。
UIImage *img = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"image" ofType:@"png"]];
或
UIImage *img = [[UIImage alloc] imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"image" ofType:@"png"]];
【问题讨论】:
标签: objective-c uiimage ios5