I am trying to determine which section of the UITableView is visible (on top, if there are 2 sections simultaneously), in swift 2. So far I found this solution: Is there any way to know if the user is scrolling tableview up or down? in swift IOS , this: How to get a UITableView's visible sections? and this one: Swift - UITableView scroll event
All of them not working for me for reasons:
1. I can not add UIScrollViewDelegate, because swift 2 is giving error on redundant conforming to protocol (because it is UITalbeView, and it already conforms to UIScrollView).
2. However, this:
func scrollViewDidScroll () {
print("scrolled: \(self.tableView.indexPathsForVisibleRows)")
}
is never being launched.
Delegate and data source for the UITableView are defined through storyboard interface builder.
How would you determine in swift 2 that UITableViewController is being scrolled, and which section is visible?