title: Iphone: TabView + TableView
body: <p>I think I'm missing something simple, but I can't figure out exactly what it is.</p>
  
  <p>I'm trying to set up an App with a <code>UITabViewController</code>, and one of the Tabs will have a UITableView and UISearchBar (but no Navigation Controller).  I set up the <code>UITabViewController</code> with all the tabs in interface builder, and the views are in their own xib files. The xib file for the tab with the <code>UITableView</code> is set up and connected as follows.</p>
  
  <p>Stuff in the browser:
  File's owner (Class is my custom class that is a child of UITableViewController) view -> View</p>
  
  <pre><code>View (class UIView, reference view -&gt; File's owner) contains:
        UITableView (if i try and set references to the data source / delegate, the app breaks)
        UISearchBar (unconfigured at the moment)
  </code></pre>
  
  <p>This setup displays all the items and doesn't lock up, but I can't assign a DataSource without it crashing when i try and load the tab with the UITableView.  What should I do to get data into this table, either in IB or code?  My ideas are as follows:</p>
  
  <ol>
  <li>Implement custom UITableView class, hook up to table view in IB or to custom tableviewcontroller in Xcode.</li>
  <li>Pound head or laptop against the wall until it works.</li>
  </ol>
  
  <p>Update:
  Here's the error the simulator pushes to the console when I connect the Tableview's data source and delegate to File Owner (who's class is my custom tableviewcontroller).</p>
  
  <blockquote>
    <p>2/14/09 6:59:12 PM TabBarWillbeRight[33172] <strong>* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*</strong> -[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x523760</p>
  </blockquote>