備忘録。UITableViewCellのcontentViewって存在を知らなかった。
調べてもxibでAutoLayoutしてるケースばかりで詰まった。
やりかた
-
UITableViewCellの**contentView**の大きさをAutoLayoutで設定する。 -
estimatedRowHeightとrowHeightの設定
tableView.estimatedRowHeight = 464//だいたいの高さの見積もり?
tableView.rowHeight = UITableViewAutomaticDimension
※以下のデリゲートメソッドは実装しない
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat