viewDidAppear for UITableViewCell

前端 未结 3 489
孤街浪徒
孤街浪徒 2021-02-03 19:53

I usually use viewDidAppear method to do some UI stuff on the view after it finished appearing and I used this method in various situations were it was very useful,

3条回答
  •  遥遥无期
    2021-02-03 20:32

    The UITableViewDelegate has these functions:

    func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath)
    
    func tableView(_ tableView: UITableView, didEndDisplaying cell: UITableViewCell, forRowAt indexPath: IndexPath)
    

    The cell itself does not have callbacks for this.

提交回复
热议问题