Reputation: 1650
Is it possible to list all images inside Images.xcassets/Something so that I can display them in a table list view?
I've tried:
NSArray *pngs = [NSBundle pathsForResourcesOfType:@".png" inDirectory:@"Images.xcassets/Something"];
NSInteger count = [pngs count];
NSLog(@"%d", count);
... but with little success.
Thanks
Upvotes: 4
Views: 3849
Reputation: 119031
Don't try looking for the image files yourself - consider them to be private information in the app bundle. Instead, load them by name using imageNamed
(no need to use the @2x
or file extension).
Upvotes: 3