• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CoreAnimation and Filters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: CoreAnimation and Filters
      • From: Dmitri Goutnik <email@hidden>
  • Prev by Date: Re: Adding Categories to NSMutableData
  • Next by Date: Re: CoreAnimation and Filters
  • Previous by thread: Re: newbie question: menu item appears when app runs, but is not visible in NIB
  • Next by thread: Re: CoreAnimation and Filters
  • Index(es):
    • Date
    • Thread