2013-10-10 37 views
-1

NSInternalInconsistencyException」,理由是: '在包無法加載NIB: '一個NSBundle(加載)' 名爲'DetayViewController'故事板和 'NSInternalInconsistencyException',原因是:

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 

    [tableView deselectRowAtIndexPath:indexPath animated:YES]; 

    DetayViewController *liste = [[DetayViewController alloc]initWithNibName:@"DetayViewController" bundle:nil]; 

    if ([[akdeniz objectAtIndex:indexPath.row]isEqualToString:@"Antalya"]) { 
     liste.ptrs =0; 
     [liste setTitle:[akdeniz objectAtIndex:indexPath.row]]; 

    } 

    if ([[ege objectAtIndex:indexPath.row]isEqualToString:@"Aydın"]) { 
     liste.ptrs =1; 
     [liste setTitle:[ege objectAtIndex:indexPath.row]]; 


    [self.navigationController pushViewController:liste animated:YES]; 
} 
} 

回答

1
UIStoryboard *storyboard = someViewController.storyboard; 
[storyboard instantiateViewControllerWithIdentifier:@"DetayViewController"]; 

,或者如果它是你的第一視圖控制器

storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" /*whatever*/ bundle:nil]; 
+0

不工作... –

+0

您可能需要設置標識符(我通常使用相同的類)。 –

+0

嗯我還能做什麼 –

相關問題