Cocoa touch 来自plist的数据正在黑屏中加载详细视图

Cocoa touch 来自plist的数据正在黑屏中加载详细视图,cocoa-touch,uitableview,Cocoa Touch,Uitableview,因此,我设置了一个plist,每当有人在表视图中单击单元格时,我希望它加载到详细视图中。唯一的问题是,当点击它时,它会加载一个没有任何内容的黑色屏幕。有什么建议吗 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSLog(@"Index Selected,%d",indexPath.row); WebViewController *modalView =

因此,我设置了一个plist,每当有人在表视图中单击单元格时,我希望它加载到详细视图中。唯一的问题是,当点击它时,它会加载一个没有任何内容的黑色屏幕。有什么建议吗

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSLog(@"Index Selected,%d",indexPath.row);

WebViewController *modalView = [[WebViewController alloc] init];

NSString *urltoPass = [NSString stringWithString:[[tableData objectAtIndex:indexPath.row]objectForKey:@"cellSubtitle"]];

modalView.urlString = [[NSString alloc] initWithFormat:@"http://%@",urltoPass];
modalView.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentViewController:modalView animated:YES completion:nil];

}

您忘记实际显示新的视图控制器。您必须在
didSelectRowAtIndexPath的底部添加以下行:
方法

[self presentViewController:modalView animated:YES completion:nil];
此外,您可以完全删除下面的行,因为它没有以当前形式执行任何操作

[self.navigationController modalTransitionStyle];

谢谢@0x7fffffff ok,所以我做了以下更改,但现在它只是把我带到了一个黑屏上。不要为不同的问题编辑你的问题,问新的问题。