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