Skip navigation.
 
mlkCAOnOrderOut animation not working
FROM : Dion Crannitch
DATE : Fri May 16 16:24:08 2008

I'm using -defaultActionForKey: to add an animation when a sublayer is
removed from its parent. My animation is never used and instead the
sublayer fades out (which I assume is the default). But if I add the
animation to kCAOnOrderIn it works as I expect.

My sublayer class's defaultActionForKey: implementation looks like this:

+ (id<CAAction>)defaultActionForKey:(NSString *)key
{
   if ([key isEqualToString:kCAOnOrderOut]) {        
       return [MyAnimation animation];
   }
   return [super defaultActionForKey:key];
}

What do I need to do to change the order out animation?

Thanks,

Dion Crannitch

Related mailsAuthorDate
No related mails found.