OOP, decoupling, ivar or no? (iPhone)
<p>I'm new to OOP and trying to understand something.  I have a button that presents a popovercontroller.  In the method for when the button is pressed, I create an instance of the view controller that I want to present in the popover.  This view controller, has a couple switches for certain settings, and another button that brings up a UITableView.  The settings can change the list of items for the UITableView.  </p>

<p>Originally I just created my new vc in the action method from the button like so:</p>

<pre><code>- (IBAction)buttonPressed:(id)sender {
  MyViewController *vc = [[MyViewController alloc] initWithNibName:nil bundle:nil];
  vc.array = _specificConditions;
  // present popover and do some other stuff
}
</code></pre>

<p>So based on user input when the popovercontroller is presented, the _specificConditions ivar gets changed.  This array that populates my UITableView needs to get updated.  The only way I can think of is to have an ivar for MyViewController, so that in the places where the changes for _specificConditions gets updated, I change this value for the now ivar MyViewController.  Is this the way to do it?  It seems kind of clunky to me and didn't know if there were better ways to do this.  Thanks.</p>
