file and directory structure

Discussion in 'iPhone/iPad Programming' started by chhoda, Apr 7, 2009.

  1. macrumors 6502

    Joined:
    Oct 25, 2008
    #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
     
  2. macrumors 6502a

    Joined:
    Oct 24, 2008
    Location:
    Cambridge
    #2
    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.
     
  3. thread starter macrumors 6502

    Joined:
    Oct 25, 2008
    #3
    thanks

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

    ch
     

Share This Page