on Stack Overflow
See other posts from Stack Overflow
or by codemercenary
Published on 2010-03-07T23:29:40Z Indexed on 2010/03/08 3:51 UTC
Read the original article Hit count: 1177
in the current project I have a number of folders, with subfolders, and these contain images: 01.png, 02.png.
When I compile the app, I looked inside the the .app and noticed that all the images are placed in the top level, with no sub-folders.
So clearly when trying to load the image this doesn't work:
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"f1" ofType:@"png" inDirectory:@"Folder1/FolderA"];
But even more strangely, when loading image "f1", the image actually loads "F1"
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"f1.png"]];
Anyone have ideas on how to get around this problem?
Is there a compile option to create the folders in the app bundle?
© Stack Overflow or respective owner