Handle case where there is a single section containing a header and footer row

This commit is contained in:
Blake Watters
2012-06-25 13:43:27 -04:00
parent c28461f573
commit 3be91bed55

View File

@@ -450,8 +450,9 @@
if ([self isHeaderSection:section]) {
numberOfRows += (![self isEmpty] || self.showsHeaderRowsWhenEmpty) ? [self.headerItems count] : 0;
numberOfRows += ([self isEmpty] && self.emptyItem) ? 1 : 0;
}
} else if ([self isFooterSection:section]) {
if ([self isFooterSection:section]) {
numberOfRows += [self.footerItems count];
}
return numberOfRows;