我使用 CATextLayer var,当尝试增加字体或在此字符串中键入内容时,这些操作会产生动画效果,如何编辑或禁用 CATextLayer 的动画?
最佳答案
您可以通过在层上设置 Action 字典以返回 [NSNull null] 作为适当键的动画来实现此目的。例如:
NSDictionary *newActions = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNull null], @"contents", nil];
normalTextLayer_.actions = newActions;
[newActions release];
o 禁用淡入/淡出动画我相信 contents
键就是您要找的那个
关于iOS - 禁用或编辑 CATextLayer 的动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7546906/