PDA

View Full Version : file and directory structure




chhoda
Apr 7, 2009, 06:35 AM
Hi All,

I am needed to acess files inside a folder structure

Is there a way I can pre create the folder structure and put files in there ? I mean to say when my application runs the file and folder structure is ready. I dont want to programmatically to create folders.

for ex.. say I create files/images/a.png in xcode group. I wanna access image by files/images/a.png , can that be done and tested in xcode simulator ?

CH



jnic
Apr 7, 2009, 09:52 AM
Not entirely sure I understand your question but I'll have a go.

If you have a directory structure on disk and you want to keep that structure in Xcode, just drag the folder in and make sure "Recursively create groups..." is selected.

To access images programmatically from Xcode, you can use:

UIIMage *yourImage = [UIImage imageNamed:@"a.png"];

which should work regardless of where in your project you've placed a.png.

chhoda
Apr 10, 2009, 05:24 AM
aha thanks, but can i replicate this folder structure to iphone device without programming ?

ch