I am writing my first universal app, I have converted my nibs so that there are iPad and iPhone versions.
The iPad version is in the Resources-iPad folder and called 'InfoViewController-iPad.xib'. The iPhone version in the main folder and called 'InfoViewController.xib'
I have the following action to show the relevant xib
-(void) touchesBegan: (NSSet *) touches withEvent: (UIEvent *) event {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
infoViewController = [[InfoViewController alloc] initWithNibName:@"Resources-iPad/InfoViewController-iPad" bundle:nil];
}
else
{
infoViewController = [[InfoViewController alloc] initWithNibName:@"InfoViewController" bundle:nil];
}
infoViewController.delegate = self;
infoViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:infoViewController animated:YES];
[infoViewController release];
}
When this runs on the iPhone it works fine, but it crashes when run on the iPad. Any help would really be appreciared