-1

NSInternalInconsistencyException',原因:'无法在包中加载 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];
}
}
4

1 回答 1

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

或者如果它是你的第一个视图控制器

storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" /*whatever*/ bundle:nil];
于 2013-10-10T21:56:56.800 回答