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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:27:12+00:00 2026-06-18T11:27:12+00:00

I have created a UITableViewController. Within it I create a custom views which are

  • 0

I have created a UITableViewController. Within it I create a custom views which are returned for the header from viewForHeaderInSection. If I go into edit mode and reorder the cells, the reordered cells float above above the custom header view during scrolling. This will continue until the tableview is reloaded with [tableview reload]. Its as if the cells are moved to the top of the view stack after being dropped from the reorder.

I have got round the problem with a [tableView reload] at the end of moveRowAtIndexPath method, but I’d like to know if this is the expected behaviour. I haven’t been able to find anything about it in the documentation or googling.

  • 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-18T11:27:14+00:00Added an answer on June 18, 2026 at 11:27 am

    I think this is a bug in UITableView. If you examine the view hierarchy of a table during the moveRowAtIndexPath method you can see that the cell in question is near the top of the hierarchy – this is to support the look of it when you are dragging the cell around.

    You can’t simply move the view to the back of the hierarchy in this method either, because it has an animation in place on it which seems to override that.

    I wasn’t comfortable reloading rows from within a data update method, so my solution was to include this code:

    UITableViewCell *movedCell = [tableView cellForRowAtIndexPath:fromIndexPath];
    double delayInSeconds = 0.4;
    dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
    dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
        [tableView sendSubviewToBack:movedCell];
    });
    

    The 0.4 second delay is to give the animation in place on the cell time to complete.

    Radar’d: http://openradar.appspot.com/radar?id=2681402

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

Sidebar

Related Questions

I have created a subclass of UITableViewController that is used as the custom class
I have a UITableViewController that uses custom table view cells (and I have created
Setup: I have a custom class I've created that handles data retrieved from a
I have an UITableViewController to manage an table view which created with subclassed prototype
I have created a custom UITableViewCell which is composed by 2 UILabels and a
I'm using XCODE 4.2 on iOS5. I have created a UITableViewController custom, called picker.
In my storyboard, I have created a new UITableViewController object for which I would
I have created 3 classes as following Ext.mine.TextParent - Inherting from Textfield Ext.mine.child.TextChildA -
I have created a custom post type named People. I have created a page
Have have created a child of UITableViewCell , MenuItem which contains functionality for my

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.