我试图在 UITableViewController 之间传递数据,显示如下:
SeleccionBundesligaViewController *seleccionBundesligaVC = [[SeleccionBundesligaViewController alloc]initWithStyle:UITableViewStylePlain];
seleccionBundesligaVC.title = @"1.Bundesliga";
[self.navigationController pushViewController:seleccionBundesligaVC animated:YES];
当我选择一行时,它被关闭:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSDictionary *dic = [equipos objectAtIndex:indexPath.row];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:[NSBundle mainBundle]];
InformacionPartidaViewController *infoPartidaVC = [storyboard instantiateViewControllerWithIdentifier:@"infoPartidaVC"];
[self.navigationController popViewControllerAnimated:YES];
[infoPartidaVC.labelNombreEquipo setText:[dic objectForKey:@"nombre"]];
}
但是当我选择该行时,它不会将数据传递给“infoPartidaVC”。