2019-09-06a few seconds read (About 36 words)How to animate NSView using keyframeIssue #404 12345678let animation = CAKeyframeAnimation(keyPath: "position.y")animation.values = [50, 20, 50]animation.keyTimes = [0.0, 0.5, 1.0]animation.duration = 2animation.repeatCount = Float.greatestFiniteMagnitudeanimation.autoreverses = truemyView.wantsLayer = truemyView.layer?.add(animation, forKey: "bounce")#swiftmacOS