CoreAnimation and Filters
CoreAnimation and Filters
- Subject: CoreAnimation and Filters
- From: Joachim Deelen <email@hidden>
- Date: Thu, 29 May 2008 21:32:53 +0200
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 (email@hidden)
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:
This email sent to email@hidden