Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

problem with same animation #417

Open
make1a opened this issue Sep 7, 2018 · 1 comment
Open

problem with same animation #417

make1a opened this issue Sep 7, 2018 · 1 comment

Comments

@make1a
Copy link

make1a commented Sep 7, 2018

when the animation is not finish,run other animation,the first one will be stop。how can I solve this problem

- (void)clickBottomButtonAction:(UIButton *)sender{

//    self.userInteractionEnabled = NO;
    for (UIButton *button in self.bottomButtonArray) {
        CGRect frame = button.frame;
        frame.origin.y = _originY;
        button.frame = frame;
        button.selected = NO;
    }
    sender.selected = YES;
    POPSpringAnimation *anSpring = [POPSpringAnimation animationWithPropertyNamed:kPOPLayerPositionY];
    anSpring.fromValue = @(_originY);
    anSpring.toValue = @(_originY+10);
    anSpring.delegate = self;
    anSpring.springBounciness = 20.0f;
    [sender pop_addAnimation:anSpring forKey:[NSString stringWithFormat:@"BottomButtonPositionY%ldld",(long)sender.tag]];
//    anSpring.completionBlock = ^(POPAnimation *anim, BOOL finished) {
//        if (finished) {
//            self.userInteractionEnabled = YES;
//        }
//    };
    
}

@make1a
Copy link
Author

make1a commented Sep 7, 2018

1536312336281

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant