UIImagePNGRepresentation的问题
我正在尝试使用这行代码
[UIImagePNGRepresentation(image, 1.0) writeToFile:pngPath atomically:YES];
但显然pngPath是未宣布的。所以我必须使用stringByAppendingPathComponent
。
我用谷歌搜索了这个例子,我发现了这个
myPlistPath = [documentsDirectory stringByAppendingPathComponent:
[NSString stringWithFormat: @"%@.plist", plistName] ];
[myPlistPath retain]
;
问题是我没有plist文件,因为我不需要一个。如何解决所有这些问题并写入UIImage图像?
没有找到相关结果
已邀请:
1 个回复
逝媳蘑贩茄
然后: