Pregunta

I working with a CATextLayer var and when try to increase the font or type something in this string there is an animation effect with these actions , How can I edit or disable the animation of CATextLayer ?

¿Fue útil?

Solución

You can do this by setting the actions dictionary on the layer to return [NSNull null] as an animation for the appropriate key. for example :

   NSDictionary *newActions = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNull null], @"contents", nil];
    normalTextLayer_.actions = newActions;
    [newActions release];

o disable fade in / out animations I believe the contents key is the one you're looking for

Otros consejos

[CATransaction setDisableActions:YES];
// Make changes to the text layer here...
[CATransaction setDisableActions:NO];
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top