title: How to resize UITableViewCell to fit its content?
body: <p>I have a <code>UITableview</code> with multiple reusable TableViewCells. 
  In one cell I have a <code>UITextView</code>, that resizes itself to fit its content. Now I "just" have to resize the <code>contentView</code> of the TableViewCell, so I can read the while text. I already tried: </p>
  
  <pre><code>cell2.contentView.bounds.size.height = cell2.discriptionTextView.bounds.size.height; 
  </code></pre>
  
  <p>Or: </p>
  
  <pre><code>cell2.contentView.frame = CGRectMake(0, cell2.discriptionTextView.bounds.origin.y,     
  cell2.discriptionTextView.bounds.size.width,     
  cell2.discriptionTextView.bounds.size.height); 
  </code></pre>
  
  <p>In the method:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath 
  *)indexPath {}  
  </code></pre>
  
  <p>But it won't work.</p>
  
  <p>Does anyone know how to do this?</p>
  
  <p>New code: </p>
  
  <pre><code>    @implementation AppDetail
  
      CGFloat height;
      …
  
      - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
      {…
  
      cell2.TextView.text = self.text;
              [cell2.TextView sizeToFit];
              height = CGRectGetHeight(cell2.TextView.bounds);
       …
      }
  
      - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  
          if (indexPath.row == 0) {
              return 143;
          }
          if (indexPath.row == 1) {
              return height;
          }
  
          return 0;
      }
  </code></pre>