Given a UITableView with one visible cell at any given time, how can I determine which cell is most suitable when scrolling through a table?
I know that I can get an array of visible cells by doing this:
NSArray *paths = [tableView indexPathsForVisibleRows];
And then get the last cell (or the first or any other) by doing:
UITableViewCell* cell = (UITableViewCell*)[tableView cellForRowAtIndexPath:[paths lastObject]];
But how can I compare all the visible cells and determine which one is most suitable?
source share