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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:55:09+00:00 2026-05-24T06:55:09+00:00

I have a setup with sections in a UITableView which all have a custom

  • 0

I have a setup with sections in a UITableView which all have a custom section header view. Only one section at a time can have visible rows.

To create an effect that displays other cell rows I basically use the following function:

[self.tableView beginUpdates];

if ( sectionHeaderInsert >= 0 && sectionHeaderInsert <= numberOfSectionsInTableView ) {
    [ticketReastepsScreenView.tableView insertRowsAtIndexPaths:indexPathsInsert withRowAnimation:UITableViewRowAnimationFade];
}

[self updateTmpSelectedNumberToCurrent];

if ( sectionHeaderRemove >= 0 && sectionHeaderRemove <= numberOfSectionsInTableView ) {
    [ticketReastepsScreenView.tableView deleteRowsAtIndexPaths:indexPathsRemove withRowAnimation:UITableViewRowAnimationFade];
}

[self.tableView endUpdates];

Now what happens is that in the end the new section “opens” and the old one “closes” propperly, but: if I have more sections that fit on the screen the last section that is (partly) visible will not repaint propperly – it is completely covered in white.

All sections are asked gor new heights and I think it even asks for new views (which I hae in an array). The views are then asked to [view setNeedsDisplay];

When I scroll a bit so that the last section header disappears and then scroll it back in, it comes to life again and is visible until I change the currently open section again.

UPD: This funny behavior only appears when I do the insertRow and deleteRow together. I can also simply close one section (deleteRow) and then in a section touch-action open the new one (insertRow) and the behavior is different.

I also tried having an endUpdates and beginUpdates in between the two actions – no positive result.

UPD2: When transitioning to the final position (positions are good) I can see the last section header being painted correctly, but then disappear (no animation, simple plain white over it)

  • 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-24T06:55:10+00:00Added an answer on May 24, 2026 at 6:55 am

    Whatever the REAL problem was – I rewrote heavy parts of the TableView and I think what I’ve learned is:

    If you need a UITableViewCell, use a UITableViewCell. If you need a UIView for the section headers, use a UIView for the section headers.

    I’ve mixed the section headers with the TableViewCells just to re-use some code I had in there. Since categories can only extend one specific class I had to use delegation/provider methods/objects to re-use certain code. It may need more subclassing but is actually much safer.

    In addition auto-scrolling to a position now works significantly better and the drawing artifacts are gone.

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

Sidebar

Related Questions

I have set up a UITableView which has 3 sections in, with 3 rows
At the moment I have setup a custom ok cancel dialog with a drop
I have this setup where in my development copy I can commit changes on
I have a custom UITableViewCell which I created in Interface Builder. I am successfully
I have set up a UITableView-based app, which has a .plist for holding the
I've got the following code in one of my view controllers: - (void)tableView:(UITableView *)tableView
I have a UITableView in an iPhone application which I am refreshing (by calling
I currently have a website setup where unique links are generated every time a
I have created a UITableView with 4 Sections and 3 Rows so totally 12
So I have my UITableView, with 2 sections and 1 cell in each, and

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.