配置SSZipArchive
导入SSZipArchive后,先编译,会出现如下错误:
解决方法:
单击项目->Linked Frameworks and Libraries->点击左下角加号->输入libz.tbd->Add,再次编译即可。
压缩
NSString *str = @"/Users/mazaiting/Desktop/tomcat.zip";
[SSZipArchive unzipFileAtPath:str toDestination:@"/Users/mazaiting/Desktop/tomcat"];
解压缩
[SSZipArchive createZipFileAtPath:@"/Users/mazaiting/Desktop/tomcat1.zip" withContentsOfDirectory:@"/Users/mazaiting/Desktop/tomcat"];