I have been trying to figure out why this has been happening but it seems that, in the iPad version of my universal app, it is loading the iPhone .xib instead of the iPad on
This solution works with Storyboards while using your own custom xibs. It reuses the same .h & .m files for the views:
In your ViewController.m file add:
- (id)initWithCoder:(NSCoder *)aDecoder
{
if (self)
{
NSString* nibName = NSStringFromClass([self class]);
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)
{
self = [super initWithNibName:nibName bundle:nil];
}
else if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
{
self = [super initWithNibName:[nibName stringByAppendingString:@"~iPad"] bundle:nil];
}
return self;
}
return self;
}
Just check the xibs have the File's Owner View Controller Custom Class name set and the view outlet set.