title: Loading a UIView within UITableViewCell
body: <p>I am having an interesting problem creating the custom tableview I need...</p>
  
  <p>I found this <a href="https://stackoverflow.com/a/7690541/3369484">question</a>, but it does not really address my issue...</p>
  
  <p>I am trying to put a subclassed UIView inside a subclassed UITableViewCell. The custom view holds a UIButton and a couple labels.  Simplified, it's like this:</p>
  
  <p><img src="https://i.stack.imgur.com/nf6wg.png" alt="image of view hierarchy"></p>
  
  <p>Both the custom view and custom tableviewcell have xibs.</p>
  
  <p>MyCustomView.xib's class is set to MyCustomView and I have properties for the labels and the button as well as an IBAction for the button.</p>
  
  <p>MyCustomTableView.xib has a property for MyCustomView and is importing MyCustomView.h.  </p>
  
  <p>In MyCustomView.xib, I have this init:</p>
  
  <pre><code>-(id)initWithNibName:(NSString *)nibName nibBundle:(NSBundle *)nibBundle myLabelText:(NSString *)labelText {
      //The custom view in the tableviewcell is 69 by 64...
      if ((self = [super initWithFrame:CGRectMake(0, 0, 69, 64)])) {
          [self setmyLabelText:labelText];
      }
      return self;
  }
  </code></pre>
  
  <p>And in my TableViewController...</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
      MyCustomTableViewCell *cell = (MyCustomTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"theCell" forIndexPath:indexPath];
  
      // Configure the cell...
      cell.customView = [[MyCustomView alloc] initWithNibName:@"MyCustomView" nibBundle:nil fileContentID:@"Some Text..."];
  
      return cell;
  }
  </code></pre>
  
  <p>When I run the app, the custom tableview cell's contents are fine, but the content of the custom view inside the custom tableview cell is blank.</p>