我有一个UIView,其view.layer.mask设置为CAShapeLayer的实例。形状层包含一个路径,现在我想通过添加第二个具有奇偶规则的形状来为这个形状添加一个孔,并淡入此孔的外观。
问题是添加到路径似乎不可动画化。
我该如何为这个添加动画效果?
问题是添加到路径似乎不可动画化。
[UIView animateWithDuration:2 animations:^() {
CGPathAddPath(parentPath, nil, holePath);
[v.layer.mask didChangeValueForKey:@"path"];
}];
我该如何为这个添加动画效果?