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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:53:18+00:00 2026-06-09T23:53:18+00:00

– (UITableViewCell *)tableView:… cellForRowAtIndexPath:… { // init and sanity check if (indexPath.row == 0)

  • 0
- (UITableViewCell *)tableView:... cellForRowAtIndexPath:... {
    // init and sanity check

    if (indexPath.row == 0) {
        // make cell look like a section header
        // easier and less complex than using a custom header view

        NSLog(@"header");
        // should prove that only four cells get the bg image
        // and yet, almost every time the table is reloaded
        // one more cell unexpectedly gets the background
        // without putting another line in the debugger
    } else {
        // normal cells after row 0
        // BUG: some of these are getting the row 0 background

        NSLog(@"row");
        // firing exactly the right number of times --
        // once for each row with an index greater than 0
        // so why are some of these cells getting the header bg?

        // when these cells get the headers' contents
        // they behave exactly as one would expect
        // except that they should be the normal rows
    }

    // misc stuff, not causing problems

    return cell;
}

Short of forcing the user to completely relaunch the app just to have different data dumped into the table, I can’t figure out how to fix the bug.

The problem is less severe if I collapse every section (that is, empty the expandedSections set and reload, leaving only the pseudo-headers visible), but it doesn’t go away.


Edit:

Initial load: screenshot
After reloading: screenshot
Links instead of images because it’s an iPad app.
Using some dummy content for testing.

Is this any help? I know there needs to be more code for serious help, but I don’t know what else to add, short of a link to the code for the entire view.

  • 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-09T23:53:20+00:00Added an answer on June 9, 2026 at 11:53 pm

    Have you tried setting a different cell identifier for the first cell and another one for the rest of them?
    The tableView reuses the same cell type when creating new cells so it might get them mixed up. By using different cell identifiers for each type, it will know exactly when to use each cell.

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

Sidebar

Related Questions

I would like to count the length of a string with PHP. The string
My NSXMLParser breaks on this string: <title>AAA &#8211; BCDEFGQWERTYUIO</title> I parsed it in this
I am getting the value from web service like &gt;&lt;&amp;&nbsp; etc. I want to
I've got the following login script.. <?php $name = $_POST[name]; $password = $_POST[password]; $query
So to start, I have an array of XML files. These files need to
I'm struggling to position the second level of a dropdown nav menu and was
Have a webpage that will be viewed by mainly IE users, so CSS3 is
I'm trying to craft a Java regular expression to split strings of the general
Welcome to Spring Roo. For assistance press CTRL+SPACE or type hint then hit ENTER.
I am reading some og tags from sites but I can't seem to decode

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.