title: Passing objects using didSelectRowAtIndexPath:
body: <p>How do I pass between objects from uitableviews to my detail views? I've set up a conditional push, as you can see in my method:</p>
  
  <pre><code>-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
  
      Budget * tempBudget = [self.budgetPlan.budgets objectAtIndex:indexPath.row];
  
      NSString *targetViewControllerIdentifier = nil;
      if (tempBudget.hasBeenInitialized != true) {
          targetViewControllerIdentifier = @"budgetInitializerView";
          UIViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:targetViewControllerIdentifier];
          [self.navigationController pushViewController:vc animated:YES];
  
          // how do I pass the tempBudget to the pushed view?
  
  
      } else {
          targetViewControllerIdentifier = @"budgetDetailsView";
          UIViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:targetViewControllerIdentifier];
          [self.navigationController pushViewController:vc animated:YES];
  
          // how do I pass the tempBudget to the pushed view?
  
      }
  }
  </code></pre>
  
  <p>I'm having trouble with the <code>UIViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:targetViewControllerIdentifier];</code></p>
  
  <p>Usually, I just set
      vc.budget = tempbudget as the answer below suggests, but it does not seem to understand the budget property.</p>