UITableVIew header without bouncing when pull down

前端 未结 3 1422
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-13 20:39

I have a UITableView which I am able to add a header view to fairly easily. Many apps (like Facebook, for viewing events) have a headerView that when you pull d

3条回答
  •  温柔的废话
    2020-12-13 21:28

    There is 2 ways you can set the table header:

    • Using the .tableHeaderView property directly (this header scrolls with the table)

    • Overriding the - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section function (this header stays static with the section)

    By the sounds of it you should use the 2nd method instead of using the .tableHeaderView property

提交回复
热议问题