• 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
Core animation update layer properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core animation update layer properties


  • Subject: Core animation update layer properties
  • From: Nik Youdale <email@hidden>
  • Date: Mon, 10 Dec 2007 01:57:50 +1100

Hey there,

I want to fade out a layer (from opacity 1 to 0) using a CABasicAnimation.

I have tried the following:

CABasicAnimation *a = [CABasicAnimation animationWithKeyPath:@"opacity"];
a.fromValue = [NSNumber numberWithFloat:1.0];
a.toValue = [NSNumber numberWithFloat:0.0];
a.duration = 1.0;
[layer addAnimation:a forKey:@"myFadeOut"];


This works fine, however when the animation completes the layers opacity reverts back to its value before the animation began (1.0 in this case).

Is there any way I can tell the animation to update the real opacity property, instead of just the 'presentation' one?
_______________________________________________


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: Core animation update layer properties
      • From: David Duncan <email@hidden>
    • Re: Core animation update layer properties
      • From: Bill Dudney <email@hidden>
  • Prev by Date: Re: Writing GNU-Step compatible Cocoa
  • Next by Date: Re: Newbie: compare version string
  • Previous by thread: Re: Newbie: compare version string
  • Next by thread: Re: Core animation update layer properties
  • Index(es):
    • Date
    • Thread