I have six labels in my table view controller that all have the same id, however they have different tags. Once I click a cell, I would like to pass the value of each label (float values) into the next view controller activity. I am not sure how to go about this, and what to declare in the .h file and the .m file to make it work. Here is the code from the .m tableviewcontroller
file.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"NodeCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:
CellIdentifier forIndexPath:indexPath];
UILabel *label;
Node *node = [self.nodes objectAtIndex:indexPath.row];
label = (UILabel *)[cell viewWithTag:1];
label.text = node.nodeid;
label = (UILabel *)[cell viewWithTag:2];
label.text = [NSString stringWithFormat:@" %.0f", node.lastdelivered1.floatValue];
label = (UILabel *)[cell viewWithTag:3];
label.text = [NSString stringWithFormat:@" %.0f", node.lastdelivered2.floatValue];
label = (UILabel *)[cell viewWithTag:4];
label.text = [NSString stringWithFormat:@" %.0f", node.lastdelivered3.floatValue];
label = (UILabel *)[cell viewWithTag:5];
label.text = [NSString stringWithFormat:@" %.0f", node.lastdelivered4.floatValue];
label = (UILabel *)[cell viewWithTag:6];
label.text = [NSString stringWithFormat:@" %.0f", node.lastdelivered5.floatValue];
label = (UILabel *)[cell viewWithTag:7];
label.text = [NSString stringWithFormat:@" %.0f", node.lastdelivered6.floatValue];
return cell;
}