0

I have an application that takes up too much space and I would like to lower the weight, so I had decided to put all the images in a zip file and install it in the application rather than adding the images to the project. Is it possible, or does someone have a better idea? thanks

4

2 に答える 2

0

これを使用して、アプリ内でファイルを解凍できます。

- (void)UnzippingZipFile {

    NSArray  *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString *outputPath = [documentsDirectory stringByAppendingPathComponent:@"/FolderName"];

    NSString *filePath = [NSString stringWithFormat:@"%@/%@", documentsDirectory,@"ZipFile.zip"];
    NSString *zipPath = filePath;

    [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:self];

}
于 2013-11-13T15:22:20.073 に答える