创建UIImage的两种方法

1.

UIImage *img = [UIImage imageNamed:@"imageName"];

2.

NSString *imageFilePath = [[NSBundle mainBundle] pathForResource:@"100" ofType:@"jpg"];
NSData *imageData = [NSData dataWithContentsOfFile:imageFilePath];
UIImage *image = [UIImage imageWithData:imageData];
原文地址:https://www.cnblogs.com/lear/p/3995159.html