ios - How to add a directory structure with duplicate filenames to a project? -
i have directory boils down this:
/ - character0 -- attribute0 -- image.png - character1 -- attribute0 -- image.png i dropped in xcode, in order define 2 characters. load each image.png
ciimage * cheetah = [ciimage imagewithcontentsofurl:[[nsbundle mainbundle] urlforresource:@"image" withextension:@".png"]]; what cheetah ? how can character0 ?
if add 2 files "image.png" project, both copied top-level directory of application bundle, end 1 file "image.png" in app.
if drag folders "character0", "character1" onto project , choose option "create folder references added folders", entire folder hierarchies copied application bundle, , can reference resources separately e.g.
nsurl *url = [[nsbundle mainbundle] urlforresource:@"image" withextension:@"png" subdirectory:@"character0/attribute0"];
Comments
Post a Comment