此代码是从我的“设置”选项卡内的“导航”视图中调用的。它在 iOS 5.1 但不是iOS 6的最后一行崩溃。为什么?
else if (indexPath.section == 0 && [[settingsArray objectAtIndex:indexPath.row] isEqualToString:@"Unlock Premium Features"])
{
InAppViewController *inappController = [[InAppViewController alloc] initWithNibName:@"InAppViewController" bundle:nil];
inappController.titleString = @"Upgrade to Pro.";
EditNavController *navController = [[EditNavController alloc] initWithRootViewController:inappController];
[self.navigationController presentModalViewController:navController animated:NO];
}
它崩溃:
[self.navigationController presentModalViewController:navController animated:NO];
这是崩溃:
*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'