file and directory structure

Discussion in 'iOS Programming' started by chhoda, Apr 7, 2009.

  1. chhoda macrumors 6502

    Oct 25, 2008
    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 ?

  2. jnic macrumors 6502a

    Oct 24, 2008
    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.
  3. chhoda thread starter macrumors 6502

    Oct 25, 2008

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


Share This Page