Skip to content

Commit

Permalink
Merge pull request #99 from pilot34/fix_scrolling
Browse files Browse the repository at this point in the history
Fix stopAnimating to prevent unnecessary scrolling
  • Loading branch information
samvermette committed Jan 15, 2013
2 parents b685d57 + dc8e28d commit 52431a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SVPullToRefresh/UIScrollView+SVPullToRefresh.m
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ - (void)startAnimating{
- (void)stopAnimating {
self.state = SVPullToRefreshStateStopped;

if(!self.wasTriggeredByUser)
if(!self.wasTriggeredByUser && self.scrollView.contentOffset.y < -self.originalTopInset)
[self.scrollView setContentOffset:CGPointMake(self.scrollView.contentOffset.x, -self.originalTopInset) animated:YES];
}

Expand Down

0 comments on commit 52431a4

Please sign in to comment.