[英]How to convert NSData object to file ouput
在我的iPhone项目中,我需要将NSData对象转换为文件。我必须将NSData转换为文件,并保存在项目的资源文件夹中并需要使用它。如何将NSData保存为文件,以及如何在我的项目中将其作为资源引用?
NSData has a function you can call to write it to a file: NSData具有可以调用以将其写入文件的功能:
[nsDataObject writeToFile:path atomically:YES];
where path is the path and filename you want to write it to. 其中path是要写入的路径和文件名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.