Tai Squared
Tai Squared

Reputation: 12333

Scrolling table overlaps section header

How can you have a UITableView where the header view remains stationary, but the rows don't overlap the section header? With my table, when scrolling the rows, the header is stationary, but when scrolling, the rows slide under the section name. Is it possible to have the rows scroll without going under the section header?

Upvotes: 5

Views: 3459

Answers (1)

Tai Squared
Tai Squared

Reputation: 12333

I updated the viewForHeaderInSection method to set the background color of the view to gray. Previously, it was clear, so the rows appeared to scroll underneath the section header. With the color change, the header remains in place and the rows don't show through.

Upvotes: 9

Related Questions