Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chhoda

macrumors 6502
Original poster
Oct 25, 2008
285
1
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

macrumors 6502a
Oct 24, 2008
567
0
Cambridge
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:

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

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

chhoda

macrumors 6502
Original poster
Oct 25, 2008
285
1
thanks

aha thanks, but can i replicate this folder structure to iphone device without programming ?

ch
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.