I have a doubt: is there any way to intercept a tableView
scrolling to add it an action? For example my prototype cell
background is red, touching up inside a cell its background color begin blue and scrolling the tableView
background color return red.
Is it possible to do this?!
Thanks in advance.
UITableView
inherits from UIScrollView
and UITableViewDelegate
extends UIScrollViewDelegate
.
Particularly you may be interested in scrollViewDidScroll
method. So, in your UITableViewDelegate
implementation, add the following method:
func scrollViewDidScroll(_ scrollView: UIScrollView) {
NSLog("Table view scroll detected at offset: %f", scrollView.contentOffset.y)
}