我在 sqlite 数据库中有图像的完整路径,该图像存储在设备中,我需要使用该图像设置 UIImage。
例子:
NSLog(@"Path %@", imagePath);
输出:
/Users/Sk*****/Library/Application Support/iPhone Simulator/4.3.2/Applications/15977219-DEFE-407A-BB80-72E188E18DD2/Documents/20-10-20111746.png
最佳答案
使用 + (UIImage *)imageWithContentsOfFile:(NSString *)path
UIImage *image = [UIImage imageWithContentsOfFile:imagePath];
关于iphone - 使用图像的路径初始化 UIImage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7840607/