我可以修复部分 header 视图不在 UITableView 的顶部吗

can I fix section header view not in the top of UITableView

我们知道,普通的 UITableView 会将其 header 部分视图固定在其顶部。我们能否让 header 视图不浮动在其 UITableView 的顶部,而是固定在另一个位置,例如距其 UITableView 顶部 100 点?

任何理想将不胜感激,谢谢

您可以将自定义视图作为 header 添加到您的 table 视图并将 table 视图的位置设置为低于 100 点。

抱歉,没有任何方法可以阻止它。但是您可以使用 UITableViewCell 来实现这种功能...获取部分的第一个单元格以显示部分详细信息并将截面高度设置为 0..