title: iOS calculate text height in tableView cell
body: <p>i'm currently developing on an app, which displays some tweets in a tableview. On the storyboard i created a prototype-cell, which includes the basic gui concept of a tweet entry.</p>
  
  <p>It looks circa like this:</p>
  
  <pre><code>++++++++++++++
  ++Username++++
  ++++++++++++++
  ++Tweet+++++++
  ++++++++++++++
  ++Time-Ago++++
  ++++++++++++++
  </code></pre>
  
  <p>Now i'm calculating the height of the cell with the following code, but somehow it fails.</p>
  
  <pre><code>- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
      NSDictionary * currentTweet = [tweetArray objectAtIndex: indexPath.row];
      NSString * tweetTextString = [currentTweet objectForKey: @"text"];
      CGSize textSize = [tweetTextString sizeWithFont:[UIFont systemFontOfSize:15.0f] constrainedToSize:CGSizeMake(630, 1000) lineBreakMode: NSLineBreakByWordWrapping];
  
      float heightToAdd = 24 + textSize.height + 15 + 45;
      if(heightToAdd &lt; 90) {
          heightToAdd = 90;
      }
  
      return heightToAdd;
  }
  </code></pre>
  
  <p>By the way, there is something other, which is strange. If i scroll the tableview the whole app seems to freeze. Is this normal or am i doing something wrong?</p>