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

Re: Core animation update layer properties


  • Subject: Re: Core animation update layer properties
  • From: Bill Dudney <email@hidden>
  • Date: Sun, 9 Dec 2007 09:39:25 -0700

Hi,

I would approach it in one of these ways;

1) Remove the layer from its superlayer using a fade transition
2) Call layer.opacity = 0.0f with the timing set to one second on a transaction


HTH,

-bd-
http://bill.dudney.net/roller/objc

On Dec 9, 2007, at 7:57 AM, Nik Youdale wrote:

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

_______________________________________________

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


References: 
 >Core animation update layer properties (From: Nik Youdale <email@hidden>)

  • Prev by Date: Extra call to validateMenuItem before triggering action; new in Leopard?
  • Next by Date: IB 3 z-order problem
  • Previous by thread: Core animation update layer properties
  • Next by thread: Re: Core animation update layer properties
  • Index(es):
    • Date
    • Thread