tags:

views:

46

answers:

1

I have Images folder inside the Resources folder which contains images. I am using the following code to access the images but the resultant array always comes out to be empty:

NSArray *imagesPath = [bundle pathsForResourcesOfType:@"gif" inDirectory:@"Images"]; 

Am I missing something??

+1  A: 

If you do [[NSBundle mainBundle] pathForResource:@"Images" ofType:nil] do you get the correct path for that folder? If not are you sure that is a folder and not a simple group?

rano
Oh!! You are right! It is not a folder. It is a group. How do I add a folder inside the Resources folder since when I right click on Resources there is no option to add a new folder.
azamsharp
when you try to do add>existing files... select the folder and then check the 'Create folder references' instead of 'Recursively create groups'
rano