Change section header view after scrolling down

Viewed 1779

I want to modify the section header view when user scrolls down, something similar to this in Music app (Notics how the view background color has changed and got a bottom border)

screen shots

Is there a good way to track when the view is on top of the section or in scrolling position?

Update:

My only solution so far is to keep an array of all the section header views and change the view of the first visible section in scrollViewDidScroll: delegate method (getting the first visible section index using tableView.indexPathsForVisibleRows array)

If anyone can come up with a simpler way, that would be great!

2 Answers
Related