I have an iPhone application that comes in differently skinned flavors, with different art assets and sounds, but all the same code.
I've got things set up with multiple targets, but the problem I'm having is I have to have a different set of UIBuilder nib files, one per view per target, set up to point to the correct art for that target.
This is a little frustrating, because if I make a change to one nib file, I have to manually make the same changes, same connections, etc in all the other nib files. I also put all the assets in with different names for the different skins as well, so they don't collide in the project. So, if I have targets A and B, I have a_main_menu.png
, b_main_menu.png
... a_FooViewController.xib
, b_FooViewController.xib
... etc.
Is there a way to make a nib file that points to assets that have the same name, but are in... umm, different bundles? is that what a bundle is for? I can imagine fixing something like this in my code (probably search and replace A for B in the nib before loading it could even be good enough), though I haven't tried it, that's ugly.
This was a manageable strategy for my first set of applications (though far from optimal), but as my stuff gets more complex, it's getting REALLY hard to keep my builder files in sync, and it's just not a very DRY way to work. Is there a better way aside from ditching uibuilder and creating my views in code?
It would be nice if this worked at the xcode/builder level, so builder would respect my current target and show the art for that target while I'm working... but I can maybe live without that, like if I could select the current set of art at run time, and I'd only be able to work with one set in builder. I could also do it with one set of nibs by having a single target and manually replacing all the art before building, but that's not very nice either.
Best of all would be if I could mix the two strategies - like if I have one target that has one view out of several that just HAS to be laid out differently... but that's optional.
Am I asking the right question?
Thanks!