源码0602-08-掌握-解压缩
Posted laugh
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了源码0602-08-掌握-解压缩相关的知识,希望对你有一定的参考价值。
// // ViewController.m // 08-掌握-解压缩 #import "ViewController.h" #import "Main.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; [Main unzipFileAtPath:@"/Users/xiaomage/Desktop/TestAbc.zip" toDestination:@"/Users/xiaomage/Desktop"]; } - (void)createZipFile2 { [Main createZipFileAtPath:@"/Users/xiaomage/Desktop/TestAbc.zip" withContentsOfDirectory:@"/Users/xiaomage/Desktop/Test"]; } - (void)createZipFile { NSArray *paths = @[ @"/Users/xiaomage/Desktop/Test/Snip20150713_276.png", @"/Users/xiaomage/Desktop/Test/Snip20150713_299.png", @"/Users/xiaomage/Desktop/Test/Snip20150713_500.png" ]; [Main createZipFileAtPath:@"/Users/xiaomage/Desktop/TestAbc.zip" withFilesAtPaths:paths]; } @end
// // ViewController.m // 09-掌握-解压缩 #import "ViewController.h" #import <SSZipArchive.h> @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; // [SSZipArchive createZipFileAtPath:<#(NSString *)#> withFilesAtPaths:<#(NSArray *)#>]; // [SSZipArchive createZipFileAtPath:<#(NSString *)#> withContentsOfDirectory:<#(NSString *)#>]; } @end
以上是关于源码0602-08-掌握-解压缩的主要内容,如果未能解决你的问题,请参考以下文章