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 655211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:34:44+00:00 2026-05-13T22:34:44+00:00

I have the same question problem as described here How to purge a cached

  • 0

I have the same question problem as described here How to purge a cached UITableViewCell

But my problem can’t be solved with “resetting content”.

To be precise – I use a custom cell (own class). While running the application it is possible that I have to use a different “cell type”.
It’s the same class – but it has (a lot of) differnt attributes.
Of course I could always reset all the things at “PrepareForReuse” but that’s not a good idea I guess (there are a lot things to reset).

My idea – I do all these things in the constructor of the cell.
And all the rows will use this “type of cell” later.
When the (seldom) situation comes that I have to change the look of all rows I create a new instance of this kind of cell with different settings.
And now I want to replace the queued cell with this new one.

I tried it with simply calling the constructor with the same cellidentifier (in the hope it will replace the existing one) but that doesn’t work.

I also didn’t find a “ClearReusableCells” or something like this.

Is there a way to clear the cache – or to remove / replace a specific item?

Manfred

  • 1 1 Answer
  • 1 View
  • 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-05-13T22:34:45+00:00Added an answer on May 13, 2026 at 10:34 pm

    Create each cell type (even if they use the same cell class) using a different identifier. So if you have 2 cell types, define 2 identifiers and keep them separate.

    I’m not sure where your problem is. You have a bunch of cells, with appearance A, then the user takes some action and they need to become appearance B. If you call reloadData or one of the more granular methods, your datasource will be called again for cellForRowAtIndexPath. Just implement this method to segregate the two cell types.

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
        NSString* identifier = which mode are we in
        UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:identifier]; // Will return nil if we haven't got this cell
        if( !cell ) {
            // Create different cell type based on the identifier   
        }
        return cell;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the same problem as described in this question , but there it's
I have basically the same problem outlined in this question, however I am using
I have seen several questions with people asking about the same problem but none
I have the same question as #1895500 , but with PostgreSQL not MySQL. How
I have previously solved a similar problem in this question , where I asked
I have posted a question on here previously asking similar advise, but this project
I have the same initial problem as described in Integrate NSStepper with NSTextField: I
This question is a more special case of the problem described (and solved) in
Very specific question but we have some good Ada people here so I would
I have posted another question for the same project which was helpfully answered but

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.