How to scroll the header along with the UITableView?

前端 未结 6 1867
一整个雨季
一整个雨季 2021-02-02 07:07

I have a UITableView with a header. the problem I currently have is that the header doesn\'t scroll with the table. I need it to scroll off screen (above) when the

6条回答
  •  失恋的感觉
    2021-02-02 08:02

    That behavior is only common when the UITableViewStyle property of the table is set to UITableViewStylePlain. If you have it set to UITableViewStyleGrouped, the headers will scroll up with the cells.

    This answer is taken from this question.

    This solution works regardless of the number of headers.

提交回复
热议问题