title: Is it possible to change static cell height in iOS 7 using Swift?
body: <p>I know it is a question that somebody maybe answered but I can't find the solution yet.</p>
  
  <p>I'm trying to change the hight of a static cell by code using Swift. I'm using this method 
  <code>func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -&gt; CGFloat</code></p>
  
  <p>But the cell size is not changing based on the content of the label. This is what I have:</p>
  
  <pre><code>@IBOutlet weak var testDetailsLabel: UILabel!
  @IBOutlet weak var testDetailsCell: TestDetailsTableViewCell!
  
  override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -&gt; CGFloat {
  
      if indexPath.section == 1 &amp;&amp; indexPath.row == 0 {
          self.testDetailsCell.descriptionLabel?.text = self.test?.details
          self.testDetailsCell.setNeedsLayout()
          self.testDetailsCell.layoutIfNeeded()
          self.testDetailsCell.bounds = CGRectMake(0.0, 0.0, tableView.bounds.width, self.testDetailsCell.bounds.height)
          self.testDetailsCell.setNeedsLayout()
          self.testDetailsCell.layoutIfNeeded()
  
          let size = self.testDetailsCell.contentView.systemLayoutSizeFittingSize(UILayoutFittingCompressedSize) as CGSize!
  
          return size.height + 1
      }
  
      return super.tableView(tableView, heightForRowAtIndexPath: indexPath)
  }
  </code></pre>
  
  <p>Any body know if it possible to change the height size for static cells?</p>
  
  <p>Maybe the constraints are the problem? I have both sides constraints, top, bottom and height >= constraint.</p>