title: How to push view depending on the row selection?
body: <p><img src="https://i.stack.imgur.com/egsU6.png" alt="enter image description here">/*****UPDATED** ***/<img src="https://i.stack.imgur.com/zXc5a.png" alt="Second Image"><img src="https://i.stack.imgur.com/nDc6m.png" alt="enter image description here">r.com/YH3cm.png</p>
  
  <p>I am trying to figure out in the above image, how will we know if the user has selected Date or Track. 
  /<em>UPDATED</em>/
  The data I am receving is through a select query and I create an array to store the list. It is dynamic and not necessary limited to two fields, it can have 10 fields also. How will I know which row is selected and how will I push the data on to the next view.</p>
  
  <p>Like in didSelectRowAtIndexPath, how should I push the date or track field on the next view?</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  
  if (dvController == nil) 
    dvController = [[DetailViewController alloc] initWithNibName:@"DetailView" bundle:nil];
  
  Teat *obj = [appDelegate.coffeeArray objectAtIndex:indexPath.row];
  
  dvController.obj = obj;
   // Pass the selected object to the new view controller.
   [self.navigationController pushViewController:dvController animated:YES];
  
     }
  </code></pre>