title: How does one design the datasource for a UITableView in order to sort with a UISegmentedControl?
body: <p>I am in the process of designing and coding an iPhone application to display movie times. I currently have a Movie Class which contains:</p>
  
  <ul>
  <li><code>NSString title</code></li>
  <li><code>NSSDate releaseDate</code></li>
  <li><code>NSSDate score</code></li>
  </ul>
  
  <p>My UI is a simple <code>UINavigationController</code> which has a segmented control as it's title and <code>UITableView</code> to display the Movies setup in Interface Builder. The segmented control has 3 segments: Title, Opening Date, and Score (on RottenTomatoes). The data for the table view is currently provided by a <code>NSMutableArray movies</code> which is a property of the AppDelegate.</p>
  
  <p>I know that I can register target actions using the following code, but I am unsure of how to sort the <code>UITableView</code> data at this point:</p>
  
  <pre><code>[segmentedControl addTarget:self action:@selector(action:) forControlEvents:UIControlEventValueChanged];
  </code></pre>
  
  <p>How and where do I resort the <code>UITableView</code> whenever the <code>UISegmentedControl</code> selected segment changes?</p>