これまではUITableViewCellの高さの自動計算は、以下のようにUITableViewのrowHeightで設定できましたが、Xcode 6.3 & iOS 8.3 & Swift 1.2 & iOS Simulator 8.3環境(どれが原因か不明)で動作しなくなっていました。
self.tableView.rowHeight = UITableViewAutomaticDimension
原因はよくわかりませんが、とりあえず以下で動作しています。
override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
return UITableViewAutomaticDimension
}
override func tableView(tableView: UITableView, estimatedHeightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
return UITableViewAutomaticDimension
}