Ios FacebookPOP动画延迟

Ios FacebookPOP动画延迟,ios,xcode,uianimation,facebook-pop,Ios,Xcode,Uianimation,Facebook Pop,我对反弹动画效果有困难,每当我向下滑动时,两个UI元素向下滑动,第一个是container(保存UIPickerView),它会更改坐标(x,y)和w/h值,第二个UI仅用于打开/关闭,我只应用它的坐标。我是用FacebookPOP框架做的,我还应用了反弹效果。首先向下拉,2UI有一个尾随空格,同时保持反弹效果。在不更改或刷新视图控制器的情况下,第二个/第三个向下滑动操作会按照我的预期进行 向下/向上滑动时,我的代码如下所示: if(sender.direction == UISwipeGest

我对反弹动画效果有困难,每当我向下滑动时,两个UI元素向下滑动,第一个是container(保存UIPickerView),它会更改坐标(x,y)和w/h值,第二个UI仅用于打开/关闭,我只应用它的坐标。我是用FacebookPOP框架做的,我还应用了反弹效果。首先向下拉,2UI有一个尾随空格,同时保持反弹效果。在不更改或刷新视图控制器的情况下,第二个/第三个向下滑动操作会按照我的预期进行

向下/向上滑动时,我的代码如下所示:

if(sender.direction == UISwipeGestureRecognizerDirectionDown)
{

    isDown = YES;

    POPSpringAnimation *bounceForControlView = [POPSpringAnimation animation];

    bounceForControlView.property = [POPAnimatableProperty propertyWithName:kPOPViewFrame];

    bounceForControlView.toValue=[NSValue valueWithCGRect:CGRectMake(0, 241, 320, 42)];

    bounceForControlView.springBounciness = 15;

    bounceForControlView.springSpeed = 10;


    [controlView pop_addAnimation:bounceForControlView forKey:@"bounceForControlView"];

    POPSpringAnimation *bounceForPickerView = [POPSpringAnimation animation];

    bounceForPickerView.property = [POPAnimatableProperty propertyWithName:kPOPViewFrame];

    bounceForPickerView.toValue=[NSValue valueWithCGRect:CGRectMake(0, 64, 320, 177)];

    bounceForPickerView.springBounciness = 15;

    bounceForPickerView.springSpeed = 10;

    [swipeView pop_addAnimation:bounceForPickerView forKey:@"bounceForPickerView"];

    [UIView animateWithDuration:0.7 animations:^() {

        [pullUPImage setAlpha:1.0];

        [self.pullImage setAlpha:0.0];

    }];

    [UIView animateWithDuration:0.7 animations:^() {

        [myPicker setHidden:NO];

    }];

}
if(sender.direction == UISwipeGestureRecognizerDirectionUp)
  {
    isDown = NO;

    [myPicker setHidden:YES];

    popAnimation = [POPSpringAnimation animation];

    popAnimation.property = [POPAnimatableProperty propertyWithName:kPOPViewFrame];

    popAnimation.toValue=[NSValue valueWithCGRect:CGRectMake(0, 64, 320, 0)];

    popAnimation.springBounciness = 5;

    popAnimation.springSpeed = 5;

    [swipeView pop_addAnimation:popAnimation forKey:@"slide"];

    popAnimation = [POPSpringAnimation animation];

    popAnimation.property = [POPAnimatableProperty propertyWithName:kPOPViewFrame];

    popAnimation.toValue=[NSValue valueWithCGRect:CGRectMake(0, 64, 320, 42)];

    popAnimation.springBounciness = 5;

    popAnimation.springSpeed = 5;

    [controlView pop_addAnimation:popAnimation forKey:@"slide"];

    [UIView animateWithDuration:0.5 animations:^() {

        [pullUPImage setAlpha:0.0];

        [self.pullImage setAlpha:1.0];
    }];
}
这就是动画实时工作的方式: