viewDidAppear for UITableViewCell

JAHelia picture JAHelia · May 27, 2012 · Viewed 24.6k times · Source

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, however, I need to do some UI changes on a UITableViewCell after it finished appearing, is there any available method in the SDK that does a similar job like viewDidAppear but for UITableViewCell ?

p.s. willDisplayCell did not work in my case, I need something like didDisplayCell if it really exists.

Answer

neoneye picture neoneye · May 7, 2016

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.