The quick code is missing fromValue , I had to add it to make it work.
pulseAnimation.fromValue = NSNumber(float: 0.0)
forKey must also be set, otherwise removeAnimation does not work.
self.view.layer.addAnimation(pulseAnimation, forKey: "layerAnimation")
Bassebus Aug 05 '15 at 10:04 2015-08-05 10:04
source share