[IPhone] [UITableView] How do I know when a group will completely replace another (scroll)?

Please refer to the following image for details: alt text

I think UITableView has some events that occur when scrolling them, when a group completely replaces another, but I do not know :(

+3
source share
1 answer

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.

+2
source

Source: https://habr.com/ru/post/1730172/


All Articles