我有一个桌面视图,上面有一些单元格。当我点击单个单元格我的应用程序刚刚在真正的iOS设备上崩溃但应用程序在模拟器上工作正常。请告诉我为什么应用程序崩溃在真实设备上而不是在模拟器上。< / p>
以下是该应用的代码: -
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if(indexPath.row==0)
{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"BusinessCard"];
[self.navigationController pushViewController:vc animated:YES];
}
else if(indexPath.row==1)
{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"NonBusinessCard"];
[self.navigationController pushViewController:vc animated:YES];
}
else if(indexPath.row==2)
{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"EventCard"];
[self.navigationController pushViewController:vc animated:YES];
}
}