Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8975299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:50:30+00:00 2026-06-15T18:50:30+00:00

As soon as the cell is no longer visible on the screen I need

  • 0

As soon as the cell is no longer visible on the screen I need to be notified.

UITableView already has a delegate method called tableView:didEndDisplayingCell:forRowAtIndexPath: but this delegate method never gets called. And yes I do have the delegate for my UITableView set.

Any other ways to detect a cell being removed? I need to be able to save the content (inputs) of this cell before it’s being reused by another item.

EDIT:

According to the documentation tableView:didEndDisplayingCell:forRowAtIndexPath: is iOS 6 and higher API. Is there a way to achieve this on iOS 5?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:50:32+00:00Added an answer on June 15, 2026 at 6:50 pm

    On versions of iOS older than 6.0, the table view doesn’t send the tableView:didEndDisplayingCell:forRowAtIndexPath: message.

    If you are using a subclass of UITableViewCell, you can get the same effect on older versions of iOS by overriding didMoveToWindow:

    - (void)didMoveToWindow {
        if (self.window == nil) {
            // I have been removed from the table view.
        }
    }
    

    You may need to give your cell a (weak or unsafe_unretained) reference back to your table view delegate so you can send the delegate a message.

    However, you can’t rely only on didMoveToWindow for all versions of iOS. Before iOS 6, a table view always removed a table view cell as a subview before reusing it, so the cell would always receive didMoveToWindow before being reused. However, starting in iOS 6, a table view can reuse a cell without removing it as a subview. The table view will simply change the cell’s frame to move it to its new location. This means that starting in iOS 6, a cell does not always receive didMoveToWindow before being reused.

    So you should implement both didMoveToWindow in your cell subclass, and tableView:didEndDisplayingCell:forRowAtIndexPath: in your delegate, and make sure it works if both are called, or if just one is called.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How soon after the reference count reaches zero is __del__ method called? Does the
I have an edit screen which is comprised of one huge UITableView. Each cell
I'll have to get a new cell pretty soon since my current phone has
How can I give a tableView cell background color the fade effect as soon
How can I give a tableView cell background color the fade effect as soon
I am using the code below to put together my UITableView. The Cell height
I have a very simple UITableView that has 3 sections, and 3 rows per
When I try to set up a cell in a UITableViewController that has a
Apple's iOS TableView and cell reuse is killing me. I searched and searched and
I have a UITableView with custom UITableViewCells. Each cell asynchronously loads an image and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.