I have several tableview
and I want the selected values to be displayed in the 3rd tableview
.
For this there is an array that collects the answers. But when I push on the controller with the results only the last value is displayed.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { firstarr = [[NSMutableArray alloc]init]; //array with questions [self.firstarr addObject:[self.data objectAtIndex:indexPath.row]]; //collects the data properly BodyDetailViewController* vc =[[BodyDetailViewController alloc] initWithNibName:@"BodyDetailViewController" bundle:nil]; vc.someArray = firstarr; //some array - ViewController with Results. [self.navigationController pushViewController:vc animated:YES]; }