title: Pop-up modal with UITableView on iPhone
body: <p>I need to pop up a quick dialog for the user to select one option in a UITableView from a list of roughly 2-5 items. Dialog will be modal and only take up about 1/2 of screen. I go back and forth between how to handle this. Should I subclass <code>UIView</code> and make it a <code>UITableViewDelegate</code> &amp; <code>DataSource</code>? </p>
  
  <p>I'd also prefer to lay out this view in IB. So to display I'd do something like this from my view controller (assume I have a property in my view controller for <code>DialogView *myDialog;</code>) </p>
  
  <pre><code>NSArray* nibViews = [[NSBundle mainBundle] loadNibNamed:@"DialogView" owner:myDialog options:nil];
  myDialog = [nibViews objectAtIndex:0];
  [self.view addSubview:myDialog];
  </code></pre>
  
  <p>problem is i'm trying to pass owner:myDialog which is nil as it hasn't been instantiated...i could pass owner:self but that would make my view controller the <code>File's Owner</code> and that's not how that dialog view is wired in IB. </p>
  
  <p>So that leads me to think this dialog wants to be another full blown <code>UIViewController</code>... But, from all I've read you should only have ONE UIViewController per screen so this confuses me because I could benefit from <code>viewDidLoad</code>, etc. that come along with view controllers...</p>
  
  <p>Can someone please straighten this out for me?</p>