单击tableView单元格后显示黑屏。我能够检索该单元格上的文本,但黑屏。请帮忙。UINavigationController在单击自定义TableView单元格后显示黑屏
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
//Get cell text
UITableViewCell *selectedCell = [tableView cellForRowAtIndexPath:indexPath];
UITableViewCell *myCell;
myCell = [tableView dequeueReusableCellWithIdentifier:@"BasicCell"];
myCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"BasicCell"];
NSString *val = selectedCell.textLabel.text;
[tableView deselectRowAtIndexPath:indexPath animated:NO];
//Load Image view
UINavigationController *NavViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"ImageView"];
[self presentViewController:NavViewController animated:YES completion:nil];
}
你想要做什么?你得到一个选定的单元格,然后创建一个新的单元格,然后呈现一个导航控制器?你想从中获得什么? –
您正试图在点击单元格时加载图像? –
我想加载导航控制器后,选择一个单元格,并基于该选定的单元格我想在该导航控制器中加载一个URL图像。 – user3259655