我希望在
UITableViewCell
中实现UITableView
,并根据内部UITableView
的内容大小动态调整单元格的高度。你有什么建议吗?我想要的布局如下所示...
代码示例:
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
let identifier = "OrderHistoryTVCell" let cell: OrderHistoryTVCell! = tableView.dequeueReusableCell(withIdentifier: identifier) as? OrderHistoryTVCell
let tableInnerContentSize = cell.tableInner.contentSize.height
let nn = cell.viewAfterTable.frame.height+tableInnerContentSize
return nn
}
return nn }
- PPreeti