I am trying to support multiple orientations within an iPad application, and the views that the designer came up with aren't able to be setup with purely the springs/struts model. I have laid out the views in two seperate nib files and currently use the follow...
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration;
{
if (UIInterfaceOrientationIsPortrait(interfaceOrientation))
{
[[NSBundle mainBundle] loadNibNamed:@"ConfigureViewController-Portrait" owner:self options:nil];
}
else
{
[[NSBundle mainBundle] loadNibNamed:@"ConfigureViewController" owner:self options:nil];
}
}
this works, but as expected is a little on the slow side. Is there any way to cache the results from this? Or is there some way to do this entire process that I'm missing. Just holding the top level objects that come back from it doesn't really help, because I need the NIB to know how to wire everything up.