简体   繁体   English

从NSFetchedResultsController中删除部分时更新UITableView

[英]update UITableView when section is removed from NSFetchedResultsController

UITableView question : UITableView问题:

I use Core Data and this delegate method to update my table view (of course with couple willChange and didChange) 我使用Core Data和此委托方法来更新我的表视图(当然是夫妇willChange和didChange)

- (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id <NSFetchedResultsSectionInfo>)sectionInfo
       atIndex:(NSUInteger)sectionIndex
 forChangeType:(NSFetchedResultsChangeType)type {

Why the sections under my table view are not updated if I don't ask reloadData in the end of this delegate method ?! 如果我在此委托方法的末尾不询问reloadData,为什么我的表视图下的部分没有更新?

It's difficult to tell without seeing your code.However, silly as it seems, you may have forgotten to set the NSFetchedResultsController's delegate. 不看代码很难说,但是看起来很愚蠢,您可能忘记设置NSFetchedResultsController的委托了。 Check this in your code. 在您的代码中检查一下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 UITableView中带有NSFetchedResultsController的附加部分 - Additional section in UITableView with NSFetchedResultsController NSFetchedResultsController对象在更新时从UITableView中删除 - NSFetchedResultsController object deleted from UITableView on update 扩展 UITableView 中的部分时删除标题 - headers are removed when expanding a section in a UITableView 将NSFetchedResultsController与UITableView中的特定部分相关联 - Associate NSFetchedResultsController with specific section in UITableView 使用NSFetchedResultsController更改核心数据时,UITableView更新 - UITableView update when core data changes using NSFetchedResultsController NSFetchedResultsController在更新关系后从UITableView中删除行 - NSFetchedResultsController remove row from UITableView after update relationships 避免在背景更新期间从NSFetchedResultsController跳转到UITableView。 - Avoid jump in `UITableView` during background update from `NSFetchedResultsController` 如何使用NSFetchedResultsController更新UITableView - How to update UITableView using NSFetchedResultsController 具有NSFetchedResultsController的UITableView保留没有对象的节的标题 - UITableView with NSFetchedResultsController keep header for section without objects 当首字母排序在一起时,从NSFetchedResultsController获取单个部分 - Get single section from NSFetchedResultsController when first letters are sorted together
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM