Detect when UITableView has scrolled to the bottom

前端 未结 4 1889
感动是毒
感动是毒 2020-12-13 09:01

Is the following post still the accepted way of detecting when an instance of UITableView has scrolled to the bottom [in Swift], or has it been altered (as in: improved) sin

4条回答
  •  死守一世寂寞
    2020-12-13 09:51

    Swift 3

    func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
        if indexPath.row + 1 == yourArray.count {
            print("do something")
        }
    }
    

提交回复
热议问题