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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:57:04+00:00 2026-05-26T06:57:04+00:00

I’m having a very common problem that I don’t know how to fix for

  • 0

I’m having a very common problem that I don’t know how to fix for myself, even after reading a bunch of similar posts, since making my cells non-reusable is not an option (the app slows down immensely).

The Problem

When I have 6 or more cells (maximum of 16), the contents of the first 5 cells begin appearing in all of the other cells when I scroll to them.

Though I am using reusable cells, why are the contents of my cells not being refreshed with new data that’s stored in my NSMutableArrays?

The Code

- (UITableViewCell *)tableView:(UITableView *)tableView 
cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    WorldClockTableViewCell *worldClockCell = (WorldClockTableViewCell*)[tableView dequeueReusableCellWithIdentifier:kCellID];
if(worldClockCell == nil) {

    NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"WorldClockTableViewCell" owner:self options:nil];
    worldClockCell = [topLevelObjects objectAtIndex:0];

    /*
     Set Scrolling to OFF by default. 
     User can scroll when table is in edit mode.
     */
    [worldClockCell.scrollView setScrollEnabled:NO];

    // Set Digital Clock in timeLabel
    [self setDigitalClockInLabel:worldClockCell inRow:indexPath.row];

    // Set Analog Clock Carousel in ScrollView in every cell.
    [self setAnalogClocksInScrollView:worldClockCell inRow:indexPath.row];

    // Scroll to User's Preferred Clock (if this is the first launch of WorldClockTableViewController)
    if([[shouldAutoScrollArray objectAtIndex:indexPath.row] boolValue] == YES) {

        [self scrollToUsersPreferredClock:worldClockCell atRow:indexPath.row];
        [shouldAutoScrollArray replaceObjectAtIndex:indexPath.row withObject:[NSNumber numberWithBool:NO]];

    }   

    // Add City Name to cityLabel in every cell
    [worldClockCell buildFormattedCityName:[model.timeZoneCityNames objectAtIndex:indexPath.row]];

    // Make sure new clocks created while in 'edit' mode don't scroll out of the cell
    worldClockCell.scrollView.frame = worldClockCell.scrollViewFrame;


} 

return worldClockCell;
}
  • 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-05-26T06:57:04+00:00Added an answer on May 26, 2026 at 6:57 am

    You’re doing all your cell configuration only if it created a new cell, not if it dequeued one. Pull everything out of

    if(worldClockCell == nil)
    

    except

    NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"WorldClockTableViewCell" owner:self options:nil];
    worldClockCell = [topLevelObjects objectAtIndex:0];
    

    unless you really only need to do it once, when the cell is created (and not every time it’s reconfigured to display new data).

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
We're building an app, our first using Rails 3, and we're having to build
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
Does anyone know how can I replace this 2 symbol below from the string

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.