Question

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 ?

Was it helpful?

Solution

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

OTHER TIPS

[CATransaction setDisableActions:YES];
// Make changes to the text layer here...
[CATransaction setDisableActions:NO];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top