Hi, i've been looking for a solution for this but i find no answer, i've tried a lot of thing but nothing works.
im getting an array with the files on a folder with the code
Code:
NSArray *files = [[NSFileManager defaultManager] directoryContentsAtPath:path];
and trying to load that files to another array to replace:
Code:
//NSArray * images = [NSArray arrayWithObjects:[UIImage imageNamed:@"1.jpg"], [UIImage image:@"2.jpg"], [UIImage image:@"3.jpg"], [UIImage image:@"4.jpg"], [UIImage image:@"5.jpg"], [UIImage image:@"6.jpg"], nil];
with something like:
(Edit

with these 3 option not at the same time))
Code:
NSArray * images = [NSArray arrayWithArray:files];
NSMutableArray * images = [[NSMutableArray alloc]init];
[images arrayByAddingObjectsFromArray:files];
NSMutableArray * images = [[NSMutableArray alloc]initWithArray:files];
but with these 3 options the app crash or the array is empty, can somebody help? thanks!
Edit: the array "files", does have a count different to 0, it reads ok the files from the folder.