0

UITableViewController当我点击一个didSelectRowAtIndexPath正在调用的单元格但没有转到下一个单元格时,我的所有内容都可以正常工作UITableViewController。这是我的代码:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    ViewHeadersController *detailViewController = [[ViewHeadersController alloc] initWithNibName:@"ViewHeadersController" bundle:nil];
    NSArray *resultsData = [_response objectForKey:@"results"];
    detailViewController.urlHeaders = [[resultsData objectAtIndex:indexPath.row] objectForKey:@"url"];

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

我知道didSelectRowAtIndexPath正在响应,因为我看到了NSLog.

你们中的任何人都知道发生了什么或为什么 uitablevicontroller 没有切换到下一个UITableViewController

我会非常感谢你的帮助

4

1 回答 1

0

我更改了 navegationController 所在的行:

ViewHeadersController *detailViewController = [[ViewHeadersController alloc] initWithNibName:@"ViewHeadersController" bundle:nil];
detailViewController.modalTransitionStyle   = UIModalTransitionStyleCrossDissolve;
NSArray *resultsData = [_response objectForKey:@"results"];
detailViewController.urlHeaders = [[resultsData objectAtIndex:indexPath.row] objectForKey:@"url"];
[self presentViewController:detailViewController animated:YES completion:nil];
于 2013-01-05T22:57:49.883 回答