- 設(shè)置好cell里面的約束
- 設(shè)置下面兩個(gè)屬性
tableView.estimatedRowHeight = 36.0
tableView.rowHeight = UITableViewAutomaticDimension
-
注意需要把label的lines設(shè)置成0,label才能換行顯示。
line_zero.png
tableView.estimatedRowHeight = 36.0
tableView.rowHeight = UITableViewAutomaticDimension
注意需要把label的lines設(shè)置成0,label才能換行顯示。
