Search code examples
iosuitableviewuitableviewsectionheader

UITableView Sections are not scrolling to top after ContentInset set


I created a UITableView with ContentInset of 75.

In UITableView, I set a section view with height 30

Now when I scroll the UITableView, section is fixed at 75, not scrolls along with table cells, How can I make it scroll beyond the contentInset along with table cells

Is there any built-in property of UITableView to achieve this or any custom solution for this?


Solution

  • Change your tableview's style form plain to group .

    enter image description here