Creating a UIView with a .xib for UITableView's footerView
<p>I'm trying to implement UITableView's datasource method:</p>

<pre><code>- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
</code></pre>

<p>I've done this in code and it works.  I wanted to be able to do it in IB if possible for a more complex layout.  To start, I added just a UISegmentedControl and a UIButton.  My datasource method looks like:</p>

<pre><code>- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
    // Footer should just be on the last section in the grouped table.
    if (section == kNotesSection) {
        UINib *nib = [UINib nibWithNibName:@"DetailFooterView" bundle:nil];
        NSArray *views = [nib instantiateWithOwner:self options:nil];
        UIView *nibView = [views objectAtIndex:0];
        [nibView addGestureRecognizer:tapGesture];

        return nibView;
    }
    else {
        return nil;
    }
}
</code></pre>

<p>I am able to see my footer view at the bottom of the TableView.  However, no user interaction is happening.  I click on the buttons and I don't see anything happening.  So my first question is, is this the right approach?</p>

<p>Second question, how do I associate target/action pairs with the .xib since I don't have outlets or actions connected to the .xib like I would normally with a typical UIViewController + .xib template.  This is the first time I've been trying to use a detached xib this way and not sure about the ins and outs.  Thanks!</p>
