I have a strange problem.
I have 2 XIBs and 1 ViewController. The One XIB ist for iPhone the other for iPad. In the XIB for iPad there are just bigger images.
- (void)pressShare:(UIBarButtonItem *)sender
{
NSString *nibName = @"";
if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
nibName = @"MCComunicationViewController";
}
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
nibName = @"MCComunicationViewControlleriPad";
}
MCComunicationViewController *comVC = [[MCComunicationViewController alloc] initWithNibName:nibName bundle:nil];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:comVC];
navController.navigationBar.tintColor = [MCColorFactory emerald];
navController.navigationBar.barTintColor = [UIColor whiteColor];
[self.navigationController presentViewController:navController animated:YES completion:nil];
}
On iPhone 5 with iOS 7.1 its working perfectly on iPad with iOS 7.1 it's crashing.
Debugger on iPad running says
po navController
<UINavigationController: 0x16578470>
po navController.viewControllers
<__NSArrayI 0x16590390>(
<MCComunicationViewController: 0x165780d0>
)
po comVC
<MCComunicationViewController: 0x165780d0>
It's crashing with SIGABRT in main.m and when I Debug step by step it's crashing by [self.navigationController presentViewController:navController animated:YES completion:nil];
:/ Any ideas?