Separate NIB landmarks

I try to support several orientations in the iPad application, and the views that the designer came up with cannot be adjusted using the spring / strut model. I have outlined the views in two separate nib files and am currently using the following ...

- (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, a bit on the slow side. Is there any way to cache the results? Or is there some way to do this whole process that I am missing. Just keeping the top-level objects that come back from it doesn't really help, because I need the NIB to know how to connect everything.

+5
source share
1

IB.

0

All Articles