Is there any way to avoid the tableview keep scrolling when reaching the bottom cell?
So far I managed to do this:
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
if indexPath.row == dataArray.count - 1 {
tableView.scrollToRow(at: indexPath, at: .bottom, animated: true)
}
}
and that allows me only to stop the scroll when the user "rolled" the table to bottom. But after that the user can scroll again. Only if I could disable the "down" scrolling I could achieve it. Enabling it again as soon as it moved.
But it seems a lot of work just to do that, maybe I'm missing some property that fixes the last cell bottom to tableview's bottom.
Any ideas?