Re: iPhone: CATransition done (get the key?)
Re: iPhone: CATransition done (get the key?)
- Subject: Re: iPhone: CATransition done (get the key?)
- From: "Eric E. Dolecki" <email@hidden>
- Date: Wed, 13 Jan 2010 16:17:31 -0500
If I try this:
- (void)animationDidStop:(CAAnimation *)theAnimation finished: (BOOL)flag {
NSLog(@"%@", [theAnimation type]);
}
I get a warning - but it displays "reveal" when I use
kCATransitionReveal. (CAAnimation
may not respond to '-type')
If I used two different types of animation, I could use that to determine
what to do next - but I don't like that warning.
On Wed, Jan 13, 2010 at 12:40 PM, glenn andreas <email@hidden> wrote:
>
> On Jan 13, 2010, at 11:18 AM, Eric E. Dolecki wrote:
>
> > Is there a way to do it without retaining a reference? I could do that,
> but
> > what is that key used for if not for referencing later somehow?
> >
>
> The key is used by the layer, not the animation. Animations are just
> generic "generators" that take a time value and create a value - it's up to
> the layer to decide what to do with that value.
>
> You can always use CALayer's animationForKey: to find out if it the
> animation for a specific key:
>
> if ([theLayer animationForKey:@"fadeIn"] == theAnimation) {
> }
>
>
>
>
> Glenn Andreas email@hidden
> <http://www.gandreas.com/> wicked fun!
> Mad, Bad, and Dangerous to Know
>
>
--
http://ericd.net
Interactive design and development
_______________________________________________
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