2

デバイスを振ると、画像をデフォルトに戻そうとしています。問題は、画像がデフォルトで処理され、その後のみ rippleEffect が発生することです。

前後ではなく、アニメーション中にこれを実行しようとしています。何か案は?

    -(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];
        }
    }
4

0 に答える 0