Re: Core animation update layer properties
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