iGotchya

Just need a place to file mistakes and avoid repeating them

  • Home
    • Edit
    • Delete
    • Tags
    • Autopost

    NSFetchedResultsController didChangeSection doesn't get called if the last row in the section is moved

    If you delete the last row in a section of a UITableView, or you add an entity which would lead to the creation of a new section the NSFetchedResultsController delegate method didChangeSection gets called. You would expect this to get called as well if you move the last row of a section into another section, therefore forcing the delete of the original section. It doesn't get called in this case.

    The less than perfect solution below comes from the didChangeObject delegate method, and I delete the section by hand, knowing that if there's only 1 section left then one of my sections was deleted. If there's a variable number of sections, you'll need another similar workaround.

    • 30 September 2009
    • Views
    • 0 Comments
    • Permalink
    • Tweet
    • 0 responses
    • Like
    • Comment
  • Doug Petkanics's Space

    Co-Founder of Hyperpublic. Fighting the good fight.

    Archive

    2009 (3)
    September (3)
  • About Doug Petkanics

    Co-Founder of Hyperpublic. Fighting the good fight.

  • Subscribe via RSS
  • Follow Me

      TwitterFacebookLinkedIn

Theme created for Posterous by Obox