You can get the drawing rectangle for each section using the method -rectForSection(see the section “Accessing the drawing area as a table” in UITableView documents). Then in your implementation of UITableViewDelegate you can track the scroll events in a table, for example. in the method, -scrollViewDidScroll:you can compare the current contentsOffsetand the starting point of the rectangle for each section to determine which section is currently active.
source
share