我執行的NSFetchRequest用NSFetchedResultsController。我設置了fetchBatchSize 5,和落實正確的委託方法:如何知道setFetchBatchSize是否正常工作?
- (void)controllerWillChangeContent:(NSFetchedResultsController *)controller
- (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type newIndexPath:(NSIndexPath *)newIndexPath
- (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id <NSFetchedResultsSectionInfo>)sectionInfo atIndex:(NSUInteger)sectionIndex forChangeType:(NSFetchedResultsChangeType)type
- (void)controllerDidChangeContent:(NSFetchedResultsController *)controller
我確保我fetchedResultsController
委託設置爲self
。但是,我在上面的所有委託方法中都放了一條NSLog語句,並且沒有一個被調用。我fetchRequestController
取數是204,和批量大小爲5,那麼是不是應該被調用一些的委託方法,我向下滾動表?或者另一種方法來確保它正在工作?