【发布时间】:2021-12-06 15:10:59
【问题描述】:
告诉我如何在 xcode 13 中解决此问题,更新单元格高度不起作用。在 xcode 12.5.1 中工作正常 https://www.icloud.com/iclouddrive/0Wq4Ml4Zl_0Hk4XcQxrQ3FIwg#TableView
override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if isHideCell && indexPath.row == 1 {
return 0
} else {
return tableView.rowHeight
}
}
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
guard indexPath.row == 0 else { return }
isHideCell = !isHideCell
tableView.performBatchUpdates(nil)
tableView.deselectRow(at: indexPath, animated: true)
}
【问题讨论】:
标签: ios swift uitableview uikit