How to prevent CALayer from implicit animations?

后端 未结 7 1585
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-25 14:59

When I set the backgroundColor property of an CALayer instance, the change seems to be slightly animated. But I don\'t want that in my case. How ca

7条回答
  •  感动是毒
    2020-12-25 15:06

    [CATransaction begin];
    [CATransaction setDisableActions:YES];
    //your code here        
    [CATransaction commit];
    

提交回复
热议问题