Skip to content

Commit

Permalink
UIScrollView does not implment numberOfSections
Browse files Browse the repository at this point in the history
  • Loading branch information
jwhitehorn committed Sep 18, 2012
1 parent cd74d25 commit 1292cc7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ODRefreshControl/ODRefreshControl.m
Expand Up @@ -173,10 +173,12 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
if (!_didSetInset) {
_didSetInset = YES;
_hasSectionHeaders = NO;
for (int i = 0; i < [(UITableView *)self.scrollView numberOfSections]; ++i) {
if ([(UITableView *)self.scrollView rectForHeaderInSection:i].size.height) {
_hasSectionHeaders = YES;
break;
if([self.scrollView respondsToSelector:@selector(numberOfSections)]){
for (int i = 0; i < [(UITableView *)self.scrollView numberOfSections]; ++i) {
if ([(UITableView *)self.scrollView rectForHeaderInSection:i].size.height) {
_hasSectionHeaders = YES;
break;
}
}
}
}
Expand Down

0 comments on commit 1292cc7

Please sign in to comment.