//两种取图片路径方法区别
NSString *path = [[NSBundle mainBundle]pathForResource:@"1" ofType:@"JPG"];
UIImage *image = [UIImage imageNamed:@"1.JPG"];
// UIImage *image = [UIImage imageWithContentsOfFile:path];
转载于:https://my.oschina.net/u/1174027/blog/187141