UITableView - How to keep table rows fixed as user scrolls

后端 未结 3 2048
隐瞒了意图╮
隐瞒了意图╮ 2020-12-24 15:29

I\'d like to be able to fix the position of certain rows in a UITableView as the user scrolls.

Specifically, I have a table whereby certain rows are \"headers\" for

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-24 15:58

    That's the default behavior for section headers in plain UITableView instances. If you want to create a custom header, implement the tableView:viewForHeaderInSection: method in your table view delegate and return the view for your header.

    Although you will have to manage sections and rows instead of just rows.

提交回复
热议问题