Continuous Rotation of NSImageView (so it appears to be animated)
<p><strong>SWIFT - OSX</strong></p>

<p>I have a bunch of imageViews set in my Main.storyboard. I am trying to make them spin when the app starts and i would like them to indefinitely. I came across the roateByAngle(angle: CGFloat), but this doesn't animate it, instead it just jumps to the new angle.</p>

<p>I would like to make two functions, spinClockwise() and spinAntiClockwise() so I can just call them in the viewDidLoad and they will just keep turning.</p>

<p>Ive been playing with CATransform3DMakeRotation but cannot seem to get my desired results</p>

<pre><code>        let width = myImg.frame.width / 2
        let height = myImg.frame.height / 2
        myImg.layer?.transform = CATransform3DMakeRotation(180,  width, height, 1)
</code></pre>

<p>Let me know if i can be more specific.
Thanks</p>