title: UITableView section index
body: <p>I have a view which displays a <code>UITableView</code> with a section index along the right side.  This was working perfectly when the controller class was a <code>UITableViewController</code>, e.g. in the .h file I had</p>
  
  <pre><code>@interface MyClass : UITableViewController
  </code></pre>
  
  <p>However, I wanted to make the table view have an image background.  I changed the <code>xib</code> file so it had a <code>UIView</code> that contained the <code>UIImageView</code> for the background and the <code>UITableView</code> for the table with a transparent background, and changed the .h file to </p>
  
  <pre><code>@interface MyClass : UIViewController &lt;UITableViewDelegate, UITableViewDataSource&gt;
  </code></pre>
  
  <p>The view, delegate and datasource are all set to the appropriate objects and everything works fine with the table.  The background shows through and the table functions properly.  But the section index is no longer displayed along the right side of the table.  </p>
  
  <p>There were no other code changes and I can get the section index back by changing the controller's view to be the <code>UITableView</code> and changing the .h file appropriately, but then the background image doesn't show.</p>
  
  <p>What is the correct way to get a section index on a <code>UITableView</code> that's inside a <code>UIView</code>?</p>