Search code examples
iosobjective-cios7ios8

How to access images in downloaded unzipped folder?


I am new to iOS and I have question, I am downloading resources ( additional images for app ) in iOS to folder

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirPath = [paths objectAtIndex:0];
NSString* strDestPath = [NSString stringWithString:documentsDirPath];

only images and I put inside folder which is created by zipping .zip file ( same name ). Is this right folder to hold resources for app and is there any way so I can treat all images inside this folder like one which I add to app before building ? ( I have to create table where every row contains one image from that unzipped folder ) ? ( I know to create table and cells when I have already images inside app, just this is confusing ).


Solution

  • NSData *imgData = [NSData dataWithContentsOfFile:imgPath];
    UIImage *thumbNail = [[UIImage alloc] initWithData:imgData];