mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-05-28 16:05:44 +08:00
Fix issue where grouping objects by section in RKTableController and loading an empty collection would fail to refresh table view.
This commit is contained in:
@@ -314,6 +314,9 @@
|
||||
|
||||
if (self.sectionNameKeyPath) {
|
||||
NSArray *sectionedObjects = [objects sectionsGroupedByKeyPath:self.sectionNameKeyPath];
|
||||
if ([sectionedObjects count] == 0) {
|
||||
[self removeAllSections];
|
||||
}
|
||||
for (NSArray *sectionOfObjects in sectionedObjects) {
|
||||
NSUInteger sectionIndex = [sectionedObjects indexOfObject:sectionOfObjects];
|
||||
if (sectionIndex >= [self sectionCount]) {
|
||||
|
||||
Reference in New Issue
Block a user