Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发一个应用程序。我正在使用 nsurlconnection 类从服务器下载 zip 文件。这里我需要根据响应存储 zip 数据而不需要解压缩。我在下载全部文件后进行解压缩操作。所以请告诉我如何根据每个响应保存 zip 文件信息。
只需从 NSUrlResponse 中获取 responseData,然后做任何你想做的事情。
如果要将其存储在磁盘上,请使用 writeToFile 方法。