NSInternalInconsistencyException',原因:'无法在bundle中加载NIB:'NSBundle(已加载)',名称为'DetayViewController''
-(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];
}
}
答案 0 :(得分:1)
UIStoryboard *storyboard = someViewController.storyboard;
[storyboard instantiateViewControllerWithIdentifier:@"DetayViewController"];
或者如果它是您的第一个视图控制器
storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" /*whatever*/ bundle:nil];