Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITableView handler for cell will hide

Tags:

ios

swift

The UITableViewDelegate has a convenient function, willDisplay.

I need to add a handler for when a cell hides, which is essentially the opposite of willDisplay. How can I detect this event?

like image 508
Daniel Que Avatar asked Mar 10 '23 17:03

Daniel Que


1 Answers

The method you'll want to use is

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

Documentation

like image 114
Craig Siemens Avatar answered Mar 23 '23 06:03

Craig Siemens