title: detail view controller not passing values back to master controller
body: <p>I have the following statement that populates a table from a json feed. After selecting a row from the table it passes back to the original controller for it to query an api again to populate some fields.</p>
  
  <p>The problem is that the value being passed back does not relate to the cell that has been selected.</p>
  
  <p>here si my code. </p>
  
  <p>in the detail view controller</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *CellIdentifier = @"Cell";
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
      NSDictionary *addressdict = [jsonData objectAtIndex:indexPath.row];
      NSString *address = [addressdict objectForKey:@"StreetAddress"];
      idnumber = [addressdict objectForKey:@"Id"];
      cell.textLabel.text = address;
      cell.detailTextLabel.text = idnumber;
      return cell;
  }
  
  
  - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
  {
      // Make sure your segue name in storyboard is the same as this line
      if ([[segue identifier] isEqualToString:@"sendAddress"])
      {
          // Get reference to the destination view controller
          SignUpViewController *controller = (SignUpViewController *)segue.destinationViewController;
          // Pass any objects to the view controller here, like...
          controller-&gt;idnumber = idnumber;
      }
  }
  </code></pre>
  
  <p>In my master view controller i do this </p>
  
  <pre><code>NSLog(@"The Address ID is: %@",idnumber);
  </code></pre>
  
  <p>but the value is it returning is not correct.</p>
  
  <p>Can anyone help?</p>