CAReplicatorLayer *replicatorLayer = [CAReplicatorLayer layer];
replicatorLayer.speed = 0.0;
replicatorLayer.frame = CGRectMake(originX, originY, self.size, self.size);
CATransform3D transform = CATransform3DMakeTranslation(circleSize + circlePadding, 0, 0);
replicatorLayer.instanceTransform = transform;
replicatorLayer.instanceCount = count;
replicatorLayer.instanceDelay = animationDuration / (count*2);
CALayer *layer = [CALayer layer];
layer.frame = CGRectMake(0, self.size*0.5 - circleSize*0.5, circleSize, circleSize);
layer.backgroundColor = [UIColor redColor].CGColor;
layer.cornerRadius = circleSize / 2;
layer.masksToBounds = YES;
layer.backgroundColor = self.tintColor.CGColor;
[replicatorLayer addSublayer:layer];
当设置speed = 0.0时,不会复制子层。我想在CAReplicatorLayer的子层上暂停动画。