I have an iPhone app that I would like to run on the iPad. It works fine on the iPhone but when I try to run it on the iPad simulator it crashes at the beginning. The crash log says,
" Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'UISplitViewController is only supported when running under UIUserInterfaceIdiomPad'"
I have tried to delete the code
from the appDelegate but with no change.
I'm sure this is easy, but I don't know how.
Does anyone know what I need to do to make this work?
Thanks.
" Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'UISplitViewController is only supported when running under UIUserInterfaceIdiomPad'"
I have tried to delete the code
Code:
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
UINavigationController *navigationController = [splitViewController.viewControllers lastObject];
splitViewController.delegate = (id)navigationController.topViewController;
}
return YES;
from the appDelegate but with no change.
I'm sure this is easy, but I don't know how.
Does anyone know what I need to do to make this work?
Thanks.