FROM : Joachim Deelen
DATE : Thu May 29 21:32:53 2008
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
DATE : Thu May 29 21:32:53 2008
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
| Related mails | Author | Date |
|---|---|---|
| Joachim Deelen | May 29, 21:32 | |
| Dmitri Goutnik | May 29, 21:53 | |
| Joachim Deelen | May 29, 22:12 |






Cocoa mail archive

