“didChangeSection:” NSfetchedResultsController delegate method not being called

后端 未结 2 1890
太阳男子
太阳男子 2021-01-19 01:01

I have a standard split view controller, with a detail view and a table view. Pressing a button in the detail view can cause the an object to change its placement in the tab

相关标签:
2条回答
  • 2021-01-19 01:56

    This problem was caused by using a transient attribute as the sectionNameKeyPath. When I instead stored the attribute used for the sectionNameKeyPath in the database, the problem went away. I don't know if there is a way to get the sections updated based on a NSFetchedResultsController content changes when using a transient attribute as a sectionNameKeyPath. For now I am considering this a limitation of transient attributes.

    0 讨论(0)
  • 2021-01-19 01:56

    I am doing the same thing in my application (transient property in the sectionNameKeyPath) and am not seeing the problem you are experiencing. I am testing this on iOS 4.2.1... There is a known bug where you cant trust any of the FRC delegate callbacks in iOS 3.X, you have to do a full [tableView reloadData] in the controllerDidChangeContent: message. see the FRC documentation

    I have tested going from an existing section with another entry in it to a nonexistent section as well as from a section with only one row to another nonexistent section.

    0 讨论(0)
提交回复
热议问题