Skip to content

Commit

Permalink
Show slime after animation complete
Browse files Browse the repository at this point in the history
  • Loading branch information
dbsGen committed Feb 23, 2016
1 parent 61c5ff3 commit fd116e5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions SlimeRefresh/SlimeRefresh/SRRefreshView.m
Expand Up @@ -65,10 +65,10 @@ - (id)initWithHeight:(CGFloat)height
[_activityIndicatorView stopAnimating];
_activityIndicatorView.center = _slime.startPoint;
[self addSubview:_activityIndicatorView];
self.autoresizingMask = UIViewAutoresizingFlexibleWidth;

[_slime setPullApartTarget:self
action:@selector(pullApart:)];
self.autoresizingMask = UIViewAutoresizingFlexibleWidth;
_dragingHeight = height;
_upInset = 44;
}
Expand Down Expand Up @@ -132,7 +132,7 @@ - (void)setLoading:(BOOL)loading
_activityIndicatorView.layer.transform = CATransform3DIdentity;
[_activityIndicatorView.layer addAnimation:aniamtion
forKey:@""];
//_slime.hidden = YES;
// _slime.hidden = YES;
_refleshView.hidden = YES;
if (!_unmissSlime){
_slime.state = SRSlimeStateMiss;
Expand All @@ -142,7 +142,6 @@ - (void)setLoading:(BOOL)loading
}else {

[_activityIndicatorView stopAnimating];
_slime.hidden = NO;
_refleshView.hidden = NO;
_refleshView.layer.transform = CATransform3DIdentity;
[UIView transitionWithView:_scrollView
Expand All @@ -157,7 +156,7 @@ - (void)setLoading:(BOOL)loading
self.alpha = 0.0f;
}
} completion:^(BOOL finished) {
//_notSetFrame = NO;
_slime.hidden = NO;
CGRect bounds = self.bounds;
_slime.frame = bounds;
_slime.toPoint = _slime.startPoint = CGPointMake(bounds.size.width / 2, _dragingHeight / 2);
Expand Down Expand Up @@ -212,7 +211,7 @@ -(void)update:(CGFloat)upInset {
- (void)pullApart:(SRRefreshView*)refreshView
{
//拉断了
self.broken = YES;
self.broken= YES;
_unmissSlime = YES;
self.loading = YES;
if ([_delegate respondsToSelector:@selector(slimeRefreshStartRefresh:)]) {
Expand Down Expand Up @@ -317,6 +316,7 @@ - (void)endRefresh

- (void)restore
{
_slime.hidden = YES;
_slime.toPoint = _slime.startPoint;
[UIView transitionWithView:_activityIndicatorView
duration:0.3f
Expand Down

0 comments on commit fd116e5

Please sign in to comment.