如何根据内部视图插座自动设置表格单元格行高?
how to set tablecell row height automatically based on inner view outlet?
我想自动设置 tableview 单元格高度以完全显示标签,而不是那样发生?
有什么帮助吗?
您需要做两件事:
第一件事:为它设置AutoLayout。
第二件事:实施这些代码:
self.tableView.rowHeight = UITableViewAutomaticDimension
self.tableView.estimatedRowHeight = 100
你可以从我的项目中看到更多:https://github.com/khuong291/Yelp
我想自动设置 tableview 单元格高度以完全显示标签,而不是那样发生?
有什么帮助吗?
您需要做两件事:
第一件事:为它设置AutoLayout。 第二件事:实施这些代码:
self.tableView.rowHeight = UITableViewAutomaticDimension
self.tableView.estimatedRowHeight = 100
你可以从我的项目中看到更多:https://github.com/khuong291/Yelp