tags:

views:

94

answers:

2

I've added a several .png files as resources to my project. How can I get an array of their names without having to hardcode them?

+1  A: 

You could try this, it works in a Mac OS X application.

NSArray *files = [[NSBundle mainBundle] pathsForResourcesOfType:@"png" inDirectory:nil]
dreamlax