Skip to content

Commit

Permalink
Takes into account adjust insets when determining pull state
Browse files Browse the repository at this point in the history
  • Loading branch information
brunnoferreira authored Apr 4, 2020
1 parent 47a5271 commit f3716d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SSPullToRefresh/SSPullToRefreshView.m
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
}

// Get the offset out of the change notification
CGFloat y = [[change objectForKey:NSKeyValueChangeNewKey] CGPointValue].y + self.defaultContentInset.top;
CGFloat y = [[change objectForKey:NSKeyValueChangeNewKey] CGPointValue].y + self.defaultContentInset.top + self.scrollView.adjustedContentInset.top;

// Scroll view is dragging
if (self.scrollView.isDragging) {
Expand Down

0 comments on commit f3716d7

Please sign in to comment.