我在做什么是保存从任何来源(相机/库)加载的图像,并将其保存到iOS中的文件系统。 我被卡住的是我如何使用该保存图像.. 我使用下面的代码。它的工作是在文件夹中创建一个Test.jpg。 但是真的不知道如何访问这个Test.jpg。加载在iOS中保存的图像
NSString *jpgPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Test.jpg"];
[UIImageJPEGRepresentation(selectedImage.image, 1.0) writeToFile:jpgPath atomically:YES];
NSError *error;
NSFileManager *fileMgr = [NSFileManager defaultManager];
NSString *documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
'[UIImage的imageNamed:@ “test.jpg放在”];'? – Kjuly