title: dynamic cell height in swift
body: <p>i have a problem with dynamic cell height.this my code, cell is not dynamic height, hơ to make it dynamic (not autolayout). thanks </p>
  
  <pre><code>func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
          let cell: CustomCell = tableView.dequeueReusableCellWithIdentifier("customCell", forIndexPath: indexPath) as! CustomCell
  
  
          let label = UILabel(frame: CGRectMake(0 , 0, cell.frame.width, cell.frame.height))
          label.text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget libero enim. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec tempor posuere augue. Pellentesque at nibh quam. Mauris at nulla id enim elementum fermentum sit amet at dolor. Phasellus quis purus eu enim ullamcorper porttitor. Praesent consectetur lorem non ligula elementum rhoncus. Pellentesque diam dolor, gravida eget quam at, consequat luctus elit. Curabitur posuere augue sed nunc ornare semper. Nunc ut lorem vitae ligula dictum dapibus quis eget ex. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas."
          label.numberOfLines = 0
          label.sizeToFit()
          label.lineBreakMode = NSLineBreakMode.ByWordWrapping
          cell.contentView.addSubview(label)
  
          return cell
      }
  
  func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -&gt; CGFloat {
          return UITableViewAutomaticDimension
      }
      func tableView(tableView: UITableView, estimatedHeightForRowAtIndexPath indexPath: NSIndexPath) -&gt; CGFloat {
          return UITableViewAutomaticDimension
      }
  </code></pre>