File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ - (NSInteger)sectionForHeaderView:(UITableViewHeaderFooterView *)headerView {
206
206
207
207
NSInteger section = NSNotFound ;
208
208
NSInteger minSection = 0 ;
209
- NSInteger maxSection = self.numberOfSections ;
209
+ NSInteger maxSection = self.numberOfSections - 1 ;
210
210
211
211
CGRect headerViewFrame = headerView.frame ;
212
212
CGRect compareHeaderViewFrame;
@@ -220,10 +220,10 @@ - (NSInteger)sectionForHeaderView:(UITableViewHeaderFooterView *)headerView {
220
220
}
221
221
else if (headerViewFrame.origin .y > compareHeaderViewFrame.origin .y ) {
222
222
minSection = middleSection+1 ;
223
+ section = middleSection; // Occurs when headerView sticks to the top
223
224
}
224
225
else {
225
226
maxSection = middleSection-1 ;
226
- section = maxSection; // Occurs when headerView sticks to the top
227
227
}
228
228
}
229
229
You can’t perform that action at this time.
0 commit comments