Allen Hsu
Allen Hsu

Reputation: 3534

Is there any way to inform every on screen UITableViewCell when viewWillDisappear?

I have a UITableViewController and a MyTableViewCell subclassing UITableViewCell.

I want to inform all the on-screen MyTableViewCell's to do something related to their properties. How can I approach this?

Or, is there any way to get all the "instances" of on screen cells?

Thanks!

Upvotes: 0

Views: 405

Answers (1)

Ole Begemann
Ole Begemann

Reputation: 135558

-[UITableView visibleCells] returns an array of visible cells. Just iterate over the array in viewWillDisappear:.

Upvotes: 1

Related Questions