title: UILabel sizeThatFits not working
body: <p>I'm trying to calculate the height for a UITableViewCell so I've defined a class method that looks like this</p>
  
  <pre><code>+ (CGFloat)heightWithText:(NSString *)text
  {
      SizingLabel.text = text;
      [SizingLabel sizeThatFits:CGSizeMake(LABEL_WIDTH, CGFLOAT_MAX)];
  
      return (TOP_MARGIN + SizingLabel.frame.size.height + BOTTOM_MARGIN);
  }
  </code></pre>
  
  <p>I've defined SizingLabel like this:</p>
  
  <pre><code>+ (void)initialize
  {
      SizingLabel = [[UILabel alloc] initWithFrame:CGRectZero];
      SizingLabel.numberOfLines = 0;
      SizingLabel.lineBreakMode = NSLineBreakByWordWrapping;
  }
  </code></pre>
  
  <p>However, if i stick a breakpoint in the -heightWithText: method, i notice that the dimensions of SizingLabel never change and i thus get an incorrect value. Why is that?</p>