去除 layer 隐式动画

1,108 阅读1分钟
自定义 view 的 layer(渐变色 frame 修改) 使用
[UIView performWithoutAnimation:^{
        
}];
无法取消 layer 的隐式动画
使用
[CATransaction begin];
[CATransaction setDisableActions: YES];
self.xxx.frame = self.xxx.bounds;
[CATransaction commit];