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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:44:20+00:00 2026-06-13T12:44:20+00:00

I will try to explain this as best as I can and hope someone

  • 0

I will try to explain this as best as I can and hope someone can understand what’s going on:

I am using core data to load data into a UITableView. I am trying to add a “last cell” to the end of the TableView to display a logo. Here is my code:

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return [[self.fetchedResultsController sections] count];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
  numberOfRows = section;
return     [[[self.fetchedResultsController sections] objectAtIndex:numberOfRows] numberOfObjects]+1;

}



- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";

cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    cell = [[ReminderCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}

cell.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"cellBackground.png"]];

row = indexPath.row;


if (row == [[[self.fetchedResultsController sections] objectAtIndex:numberOfRows] numberOfObjects]) {
    NSLog(@"%u",[[[self.fetchedResultsController sections] objectAtIndex:numberOfRows] numberOfObjects]);
    cell.productLabel.text = nil;
    cell.companyLabel.text = nil;
    cell.dateLabel.text = nil;
    cell.accessoryType = UITableViewCellAccessoryNone;
    cell.logo.hidden = NO;
    cell.renewLabel = nil;


}

else {

    Reminder *reminder = [self.fetchedResultsController objectAtIndexPath:indexPath];
    cell.productLabel.text = reminder.product;
    cell.companyLabel.text = reminder.company;
    cell.dateLabel.text = reminder.date;
    cell.logo.hidden = YES;

}

return cell;

}


- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{    
    row = [indexPath row];

if (row == [[[self.fetchedResultsController sections] objectAtIndex:numberOfRows] numberOfObjects]) {
    return 50;
}

return 78;

}

As you can tell I am telling the last cell to not have an accessory type while all of the other cells are going to have one.

The Normal Cell w/ Accessory Arrow:
Has Accessory Arrow

Last cell:
Last Cell

Everything works beautifully until I scroll down to the bottom where the last cell is and then scroll back up. The accessory arrow disappears in some of the table cells that are supposed to have it!! (BUT not all of them)

Same Cell but Arrow has disappeared:
Has No Arrow

What is going on here?

  • 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-13T12:44:21+00:00Added an answer on June 13, 2026 at 12:44 pm

    That’s because of the queueing mechanism. The tableView dequeues an arbitrary cell from it’s cache. If that cells happens to be one of those on which you previously set:

    cell.accessoryType = UITableViewCellAccessoryNone;
    

    it won’t have an accessory indicator. The easiest way to fix that (in my opinion, of course you can also use diffent reuse identifier) is the modify your code like this:

    else {
    
        Reminder *reminder = [self.fetchedResultsController objectAtIndexPath:indexPath];
        cell.productLabel.text = reminder.product;
        cell.companyLabel.text = reminder.company;
        cell.dateLabel.text = reminder.date;
        cell.logo.hidden = YES;
    
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm going to try to explain this best I can I will provide more
I will to try to explain this as best as I can. I have
I will try and explain this the best way I can. I have a
I'm going to try and explain this the best I can. I used this
I will try to explain this the best way I can, but feel free
I'm going to try to explain this as best I can. I'm returning an
I will try to explain this the best that I can. I have a
I will try to explain this the best I can. I created a CMS
I'll try to explain this as best as I can. I have a form
This will be a bit difficult to explain but I will try my best.

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.