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

  • Home
  • SEARCH
  • 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 1085879
In Process

The Archive Base Latest Questions

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

I have a grouped UITableView in my UIViewController class and I’m finding that at

  • 0

I have a grouped UITableView in my UIViewController class and I’m finding that at times, the dequeued cell is not nil as expected.

The table has 3 sections to start with and and as soon as the ‘viewDidLoad’ is invoked, a server call is initiated to find out if there are more sections. Before the view is even rendered, the server’s response arrives and we’re told that we have 4 sections. To deal with this change, I do:

[self.tableview beginUpdates]

// Do the updating of the array that holds table data

[self.tableview endUpdates]
[self.tableview reloadData];

Next I get the call to ‘numberOfSectionsInTableView’, for which I return 4, followed by ‘numberOfRowsInSection’ and I’m returning the expected correct row count. Note this is the first time I’m getting either of these calls since the table reload happened so quickly and before the view was even rendered.

At this point, only the data from the 1st 3 sections are visible and scroll to view the last section. When you scroll to see the last section, one of the cells I’m expecting to be in the call to ‘tableView:cellForRowAtIndexPath’ is not nil as expected. The cell type is actually what was used for another section (I have one type of UITableViewCell for the 1st two sections and another for the last two sections that I’m creating and handing back in cellForRowAtIndexPath when cell is nil).

So how does UITableView figure out which cell to dequeue and how do I figure out why this cell for this particular section/row is not nil when it really should be?

  • 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-16T22:44:39+00:00Added an answer on May 16, 2026 at 10:44 pm

    What are you using for your cell identifier? That’s what a UITableView will use when determining what to dequeue. If you have different types of cells, you’ll need different reuse identifiers.

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

Sidebar

Related Questions

I have a grouped UITableView where not all sections may be displayed at once,
I have a grouped UITableView that has 3 sections. I would like to show
I have a grouped UITableView that contains several cells (just standard UITableViewCell s), all
I have a grouped table view with textfields in the tableview. For the keyboard
I have some data grouped in a table by a certain criteria, and for
I have a grouped UITableView which displays a number of cells, which includes both
I have a grouped UITableView with some large images. However, scrolling performance is quite
I have a grouped UITableView, with cells in section 2 depending on cells in
I have a view in which I have UITableView (grouped style). In the Interface
I have a UITableView (grouped style) and I would like to adjust the width

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.