Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed some logistical errors

  • Loading branch information...
commit 6dbadfd563fc1ef74084e78bb265f0c9ea823956 1 parent ef88761
@alexzielenski authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 ScrollToRefresh/src/EQSTRClipView.m
View
7 ScrollToRefresh/src/EQSTRClipView.m
@@ -31,10 +31,11 @@ - (NSPoint)constrainScrollPoint:(NSPoint)proposedNewOrigin { // this method dete
NSPoint constrained = [super constrainScrollPoint:proposedNewOrigin];
CGFloat scrollValue = proposedNewOrigin.y; // this is the y value where the top of the document view is
BOOL over = scrollValue<=self.minimumScroll;
- if (self.isRefreshing) { // if we are refreshing
+
+ if (self.isRefreshing&&scrollValue<=0) { // if we are refreshing
if (over) // and if we are scrolled above the refresh view
- constrained.y = 0-self.headerView.frame.size.height; // constrain us to the refresh view
- return NSMakePoint(constrained.x, constrained.y);
+ proposedNewOrigin.y = 0-self.headerView.frame.size.height; // constrain us to the refresh view
+ return NSMakePoint(constrained.x, proposedNewOrigin.y);
}
return constrained;
}
Please sign in to comment.
Something went wrong with that request. Please try again.