Issue #600
Use same CACurrentMediaTime
final class AnimationSyncer {
static let now = CACurrentMediaTime()
func makeAnimation() -> CABasicAnimation {
let animation = CABasicAnimation(keyPath: "opacity")
animation.fillMode = .forwards
animation.fromValue = 0
animation.toValue = 1
animation.repeatCount = .infinity
animation.duration = 2
animation.beginTime = Self.now
animation.autoreverses = true
animation.timingFunction = CAMediaTimingFunction(name: .easeInEaseOut)
return animation
}
}