是什么让 UITableView 表现得像这样

What makes UITableView behave like this

制作 UI 组件(我们称它为 SearchView),里面通常包含 UITableView,其中包含搜索结果,因此我必须在 SearchView 处于活动状态时显示该结果,在不活动时隐藏. 因此,我更改 table 视图的高度约束取决于此。但是我遇到了 UITableView 的奇怪行为,它不是滚动内容,而是上下移动,内容不显示。任何帮助将不胜感激。 View buggy UITableView

P.S。相关代码在GitHub.com/zzheads/BuggyTableView.

好吧,我相信经过几天的努力我找到了答案 "bug"。 试图圆角的 tableView 是 tableView 的这种行为的原因。 所以删除 self.tableView.layer.cornerRadius = 8 解决了问题。