I have an app which utilises a set of custom "controls" which are loaded on demand from Xib files using methods similar to the below:
NSArray * topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"AudioPlayer" owner:self options:nil];
InteractiveMovieView *newAudio = [topLevelObjects objectAtIndex:0];
This approach works great except where there are multiple controls loaded at once (in effect on one "page" of the app).
Loading from the bundle each time is clearly inefficient but I can't find another way of approaching this. I've tried loading the nib into a copy
property once and returning it on demand for re-use, but that doesn't work as the copy returned is never a "clean" copy of the blank nib.
I hope that makes sense, and all help is appreciated.