I have a project with two targets, let's say appA and appB.
Both targets share code of main view controller (appViewController) except the .xib files.
I also have two sets of png's each for one target.
My file/project structure looks like:
*common* (members of both targets):
appViewController.h
appViewController.m
*appA* (members of target appA):
appViewController.xib
set of png files
*appB* (members of target appB):
appViewController.xib
set of png files
PNG's in both sets have the same names but they are placed in separate folders/groups and one group is member of one target and the other of the other target (same with appViewController.xib)
Everything works fine except when i try to edit .xib files in IB - it seemes to get confused and show partly images from one target and partly from the other.
Since .xib's are somewhat complex (>40 images) editing one with partly wrong images is almost impossible - images have to be properly placed on one background image (background image is also different for appA and appB).
The problem exists only at edit-time (in IB). After compilation all the images in both targets are correct.
I found one quick & dirty solution to this. Before i start editing one .xib i remove references to the other set of png's. That way IB shows correct images for the .xib i'm editing. I simply import back all the references (png's of the other target) when i'm done.
I found a similiar question which was not really answered.
I wonder, does anyone have a cleaner solution to this? There has to be a better way to do it.