Ios 使用GPUImage处理CATTransition动画期间的图像

Ios 使用GPUImage处理CATTransition动画期间的图像,ios,objective-c,gpuimage,catransition,Ios,Objective C,Gpuimage,Catransition,我试图在摇晃设备时将图像设置回默认值。问题是,图像正在处理为默认值,并且只有在处理之后才会发生涟漪效果 我试图在动画中做到这一点,而不是在动画之前或之后。 有什么想法吗 -(void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event{ if(motion == UIEventSubtypeMotionShake){ CATransition *animation=[CATr

我试图在摇晃设备时将图像设置回默认值。问题是,图像正在处理为默认值,并且只有在处理之后才会发生涟漪效果

我试图在动画中做到这一点,而不是在动画之前或之后。 有什么想法吗

    -(void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event{
         if(motion == UIEventSubtypeMotionShake){
            CATransition *animation=[CATransition animation];
            [animation setDelegate:self];
            [animation setDuration:1.0];
            [animation setTimingFunction:UIViewAnimationCurveEaseInOut];
            [animation setType:@"rippleEffect"];
            //[animation setFillMode:kCAFillModeRemoved];
            animation.endProgress=0.99;

            [(GPUImageBulgeDistortionFilter *)sepiaFilter setScale:0.0];
            [sourcePicture processImage];

            [animation setRemovedOnCompletion:NO];
            [self.view.layer addAnimation:animation forKey:nil];
        }
    }