title: Xcode: Assigning an Object as a UITableView datasource/delegate in Interface Builder
body: <p>I'm relatively new to Xcode.</p>
  
  <p>I am trying to do this in Xcode's Interface Builder as much as possible. Because I am working with legacy code, Storyboards are not an option.</p>
  
  <p>I'm working with a XIB I'll call DualTVController. It is based on a simple UIViewContoller.</p>
  
  <p>In this XIB I have two UITableViews, the LeftTV and the RightTV.  In IB, I am able to assign the delegate/datasource of the LeftTV to the File's Owner, which is the class representation of the XIB.  This works fine.</p>
  
  <p>I want to assign the delegate/datasource of the RightTV in IB.  So far, I've successfully been able to use the LeftTV for this, but that's just confusing. </p>
  
  <p>Instead, I have created a UITableViewController subclass called RightDelegate, and assigned it as the class of a simple Object I create through the IB.  I made it follow the UITableViewDataSource and UITableViewDelegate protocols.  This allows me to hook up the delegate/datasource of RightTV to it in IB, but when I try to run it, I get a BAD_ACCESS error.</p>
  
  <p>I have the same delegate code in RightDelegate as I do in LeftTV (which works).  Can anyone suggest the problem?  Am I responsible for instantiating RightDelegate in code?</p>
  
  <p>Thanks for any help.  </p>