Key-Value Observing the to-many relationship of an NSMutableArray
seems like a good technique for automatically updating a tableview that has a single section and many rows. However, my table view is grouped and more naturally fits having an array, sections
, with each object within being an array containing the rows for that section. Is there any way for me to use KVO to observe the row
arrays within the sections
array when the number of sections is dynamic?
Ultimately, I wanted to achieve something similar to the NSFetchedResultsControllerDelegate
methods without having to use Core Data:
- (void)controller:(NSFetchedResultsController *)controller
didChangeSection:(id <NSFetchedResultsSectionInfo>)sectionInfo
atIndex:(NSUInteger)sectionIndex
forChangeType:(NSFetchedResultsChangeType)type
- (void)controller:(NSFetchedResultsController *)controller
didChangeObject:(id)object
atIndexPath:(NSIndexPath *)indexPath
forChangeType:(NSFetchedResultsChangeType)type
newIndexPath:(NSIndexPath *)newIndexPath