self.tableView.estimatedRowHeight = 44.0 self.tableView.rowHeight = UITableView.automaticDimension 设置表格动态高度 storyboard中设置label的lines为0 storyboard中设置自动布局top,left,right,bottom 重点不需要设置高度,因为高度会自动计算出来,这时候在storyboard中看起来有点怪,没关系的。 相关文章: 2022-12-23 2022-01-01 2022-12-23 2022-12-23 2021-12-24 2022-12-23