iOS设备上的UItable上的应用程序崩溃不在模拟器上?

时间:2015-07-07 08:47:43

标签: ios objective-c iphone xcode ipad

我有一个桌面视图,上面有一些单元格。当我点击单个单元格我的应用程序刚刚在真正的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];

    }

}

0 个答案:

没有答案