Payal Maniyar
Payal Maniyar

Reputation: 4402

Which method will be called when UITabelViewCell is no more appear in UItableView

Suppose there are 20 items to display in UITableView. At a time 5 UITableViewCell are visible. I am adding observer in - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPathmethod. Now if user scrolls the table then suppose first row is not visible. So my quesion is how can I remove the observer? Any method will be called when UITableViewCell is no more visible in UITableView?

Any help will be appreciated..

Upvotes: 0

Views: 33

Answers (1)

Shamsiddin Saidov
Shamsiddin Saidov

Reputation: 2281

Here, here and here you can find the solutions for your problem. You should use below UITableViewDelegate method:

- (void)tableView:(UITableView *)tableView didEndDisplayingCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath

Upvotes: 1

Related Questions