Hi,

I'm having trouble with the following code:

        CIFilter *outFilter = [CIFilter filterWithName:@"CIZoomBlur"];
        [outFilter setDefaults];
        outFilter.name = @"zoomOutFilter";
[outFilter setValue:[NSNumber numberWithFloat:20.0] forKey:@"inputAmount"];

        [newImageLayer setFilters:[NSArray arrayWithObject:outFilter]];

        CABasicAnimation *zoomOutAnimation = [CABasicAnimation animation];
        zoomOutAnimation.keyPath = @"filters.zoomOutFilter.inputAmount";
        zoomOutAnimation.duration = 1.8;
        zoomOutAnimation.toValue = [NSNumber numberWithFloat:00.0];
        zoomOutAnimation.fillMode = kCAFillModeForwards;
zoomOutAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];

[newImageLayer addAnimation:zoomOutAnimation forKey:@"zoomOutAnimation"];

The Animation of the Filter is working fine. The ZoomBlur gets animated from 20.0 to 0.0 in 1.8 seconds. But as soon as the animation has finished, the Value for the filter instantly drops back to 20.0. I've tried different "fillModes" but to no avail. I just want to animate the Value "inputAmount" from 20.0 to 0.0 and make it stay at 0.0 after the animation has finished....

What am I missing here?

- Joachim




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to