Skip to content

Commit

Permalink
Add limit to slime.viscous
Browse files Browse the repository at this point in the history
  • Loading branch information
dbsGen committed Sep 8, 2015
1 parent 94d7584 commit 3878454
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions SlimeRefresh/SlimeRefresh/SRRefreshView.m
Expand Up @@ -205,7 +205,7 @@ - (void)didMoveToSuperview
-(void)update:(CGFloat)upInset {
if (_scrollView) {
_upInset = upInset;
_slime.viscous = _upInset;
_slime.viscous = MAX(_upInset, 32);
self.frame = CGRectMake(0, 0, _scrollView.bounds.size.width, _dragingHeight);
_slime.toPoint = CGPointMake(self.frame.size.width / 2, _dragingHeight / 2);
}
Expand Down Expand Up @@ -280,8 +280,6 @@ - (void)scrollViewDidEndDraging
inset.top = -_scrollView.contentOffset.y;
_scrollView.contentInset = inset;
} completion:^(BOOL finished) {
self.broken = NO;

[UIView transitionWithView:_scrollView.superview
duration:0.2
options:0
Expand All @@ -291,12 +289,7 @@ - (void)scrollViewDidEndDraging
_scrollView.contentInset = inset;
} completion:^(BOOL finished) {
self.broken = NO;



}];


}];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.2f];
Expand Down

0 comments on commit 3878454

Please sign in to comment.