0

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..

Payal Maniyar
  • 4,293
  • 3
  • 25
  • 51

1 Answers1

1

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
Community
  • 1
  • 1
Shamsiddin Saidov
  • 2,281
  • 4
  • 23
  • 35