xxxxxxxxxx
extension UIView {
func pulsate() {
let pulse = CASpringAnimation(keyPath: "transform.scale")
pulse.duration = 0.80
pulse.fromValue = 0.90
pulse.toValue = 1
pulse.autoreverses = true
pulse.repeatCount = 10000000000
pulse.initialVelocity = 0.98
pulse.damping = 10
layer.add(pulse, forKey: "pulse")
}
}