title: UITableViewCell from a custom .XIB file doesn't create outlets
body: <p>Update 2:</p>
  
  <hr>
  
  <p>Long story short, I was being silly (and, in my defense, not properly educated) about this. It works now. My questions have derailed from the original topic a little bit, but that's because I wasn't understanding what was going on in my application. I would like to close the question with one last (and small) query:</p>
  
  <p>I've got two labels in my customCell.xib. I want one of them (<code>cell.label2</code>) to sometimes contain a longer segment of text (2-3 lines). I know one way to make it all fit is to set the autoshrink property, but that shrinks to the text so it can fit on a single line. I want to preserve the original text size and expand the cell's height instead, making the text span multiple lines instead of shrinking it.</p>
  
  <p>Is there a way to do this?</p>
  
  <p>Update 1:</p>
  
  <hr>
  
  <p>I tried a few things based on the replies below, and they got me nowhere. I am growing convinced that I am doing something fundamentally wrong, and you guys just can't think of it because it's so basic. So let's try again. I am going to changed the names a little, so they are easier to remember.</p>
  
  <p>The problem seems to be in the fact that I can't create any <code>IBOutlets</code> or <code>IBActions</code> for my customCell. Right now I have 3 files that should handle this (DetailedDirectionViewCell.{h,m,xib}, but the Interface Builder doesn't allow me to create a property/outlet/reference out of my <code>UITableViewCell</code> object - anywhere.</p>
  
  <p>Instead of copying the code here, I've provided a PasteBin entry with links to my code. As before, I've removed the less interesting methods. Take a look if you will.
  <a href="http://pastebin.com/p4eADhKQ" rel="nofollow">http://pastebin.com/p4eADhKQ</a></p>
  
  <p>I also have customCell.{h,m}, but those are just new Objective C class files that inherit from <code>UITableViewCell</code>. <code>customCell.xib</code> is just a cell with two labels.</p>
  
  <hr>
  
  <p>So I have a couple of problems really. </p>
  
  <p>First, generating a <code>UITableView</code> programmatically, using a custom <code>UITableViewCell</code> contained in a .XIB file of its own. My DirectionsViewController class is just a <code>UITableView</code> with programmatic cells. Tapping on one of the cells needs to present a DetailedDirectionsViewController table (in a modal way), the cell design for which sits in a DetailedDirectionsViewCell.xib file. The problem is, I can't create an <code>IBOutlet</code> for the <code>UITableViewCell</code> from the nib file - anywhere. Dragging the File's Owner icon/outlet doesn't offer to create anything. Which, after 5 hours of struggling, means that I can't present my detailed view. </p>
  
  <p>The second problem involves adding a navigation bar to the DirectionsViewController, but let's leave that alone for now.</p>
  
  <p>Here are some methods you might find helpful:</p>
  
  <pre><code>//inside DirectionsViewController
  - (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)
  {
      DetailedDirectionsViewController *vc = [[DetailedDirectionsViewController alloc] initWithStyle:UITableViewStyleGrouped];
      vc.instruction = [turnList objectAtIndexPath:indexPath.row];
      [self.tabBarController presentModalViewController:vc animated:YES];
  }
  
  //inside DetailedDirectionsViewController
  - (UITableViewCell *) tableView:(UITableView *) cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *CellIdentifier = @"directionsCell";
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
      if (cell == nil)
      {
          [[NSBundle mainBundle] initWIthNibNamed:@"DetailedDirectionsViewCell" owner:nil options:nil];
          cell = self.tableViewCell;
          self.tableViewCell = nil;
      }
  
      //here I configure the custom cell
      return cell;
  }
  </code></pre>
  
  <p>I don't think the rest of the methods are of interest, because they are either working as expected, or are pretty much the default ones.</p>
  
  <p><strong>To sum up:</strong></p>
  
  <p>DirectionsViewController - essentially a <code>UITableViewController</code> with custom cells. No .xib file
  DetailedDirectionsViewController - detailed information about the entries from DirectionsViewController. Cells here should come from a .XIB file, but that's broken.
  DetailedDirectionsViewCell - this is the custom cell. I can't set its File's Owner.</p>
  
  <hr>