     let smallCircleSize: CGFloat = size.width / 2
     let longDuration: CFTimeInterval = 1
     let timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
-    circleOf(shape: .ringTwoHalfHorizontal,
+    let circleLayer1 = makeCircleLayerOf(shape: .ringTwoHalfHorizontal,
              duration: longDuration,
              timingFunction: timingFunction,
-             layer: layer,
+             layerSize: layer.frame.size,
              size: bigCircleSize,
              color: color, reverse: false)
-    circleOf(shape: .ringTwoHalfVertical,
+    let circleLayer2 = makeCircleLayerOf(shape: .ringTwoHalfVertical,
              duration: longDuration,
              timingFunction: timingFunction,
-             layer: layer,
+             layerSize: layer.frame.size,
              size: smallCircleSize,
              color: color, reverse: true)
+    layer.addSublayer(circleLayer1)
+    layer.addSublayer(circleLayer2)
   }
 
 }

  }

  // swiftlint:disable:next function_parameter_count
  func circleOf(shape: ActivityIndicatorShape, duration: CFTimeInterval, timingFunction: CAMediaTimingFunction, layer: CALayer, size: CGFloat, color: UIColor, reverse: Bool) {
    let circle = shape.makeLayer(size: CGSize(width: size, height: size), color: color)
    let frame = CGRect(x: (layer.bounds.size.width - size) / 2,
                       y: (layer.bounds.size.height - size) / 2,
                       width: size,
                       height: size)
    let animation = makeAnimationIn(duration: duration, timingFunction: timingFunction, reverse: reverse)

    circle.frame = frame
    circle.add(animation, forKey: "animation")
    layer.addSublayer(circle)
  }

}


private extension ActivityIndicatorAnimationBallClipRotateMultiple {

  func makeAnimation(duration: CFTimeInterval, timingFunction: CAMediaTimingFunction, reverse: Bool) -> CAAnimation {
    // Scale animation
    let scaleAnimation = CAKeyframeAnimation(keyPath: "transform.scale")
    scaleAnimation.keyTimes = [0, 0.5, 1]
