Skip to content

Commit

Permalink
the viscous of slime is depend on up insert.
Browse files Browse the repository at this point in the history
  • Loading branch information
dbsGen committed Jan 14, 2015
1 parent dc94e32 commit 22c1cda
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions SlimeRefresh/SlimeRefresh/SRRefreshView.m
Expand Up @@ -205,6 +205,7 @@ - (void)didMoveToSuperview
-(void)update:(CGFloat)upInset {
if (_scrollView) {
_upInset = upInset;
_slime.viscous = _upInset;
self.frame = CGRectMake(0, 0, _scrollView.bounds.size.width, _dragingHeight);
_slime.toPoint = CGPointMake(self.frame.size.width / 2, _dragingHeight / 2);
}
Expand Down
7 changes: 1 addition & 6 deletions SlimeRefresh/SlimeRefresh/SRSlimeView.m
Expand Up @@ -86,12 +86,7 @@ - (void)setToPoint:(CGPoint)toPoint
}

- (CGFloat)_getViscous {
UIInterfaceOrientation io = [[UIApplication sharedApplication].delegate window].rootViewController.interfaceOrientation;
if (UIInterfaceOrientationIsLandscape(io)) {
return _viscous * 0.7;
}else {
return _viscous;
}
return _viscous;
}

- (UIBezierPath*)bodyPath:(CGFloat)startRadius end:(CGFloat)endRadius percent:(float)percent
Expand Down

0 comments on commit 22c1cda

Please sign in to comment.