Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要一些帮助。
. 注意:不适用于底行,仅用于顶行。
这是 UITableView 的默认行为。部分标题将停留在屏幕顶部,直到下一个部分标题到达它。一种简单的解决方法是根本不使用标题,而只使用两个单元格。然后,您必须在 viewForCellAtIndexPath 中添加代码:
if(indexPath.row == 0) { //setup a header cell } else { //setup a data cell }