There was an error while loading. Please reload this page.
2 parents 80c7158 + 2efdf53 commit f51d1a3Copy full SHA for f51d1a3
8-显式动画/显式动画.md
@@ -120,7 +120,7 @@ self.colorLayer.backgroundColor = color.CGColor;
120
{
121
122
//set the from value (using presentation layer if available)
123
- animation.fromValue = [layer.presentationLayer ?: layer valueForKeyPath:animation.keyPath];
+ animation.fromValue = [(layer.presentationLayer ? layer.presentationLayer : layer) valueForKeyPath:animation.keyPath];
124
//update the property in advance
125
//note: this approach will only work if toValue != nil
126
[CATransaction begin];
0 commit comments