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];
时间: 2024-11-12 14:45:24