I am rotating an NSImageView from its center which is working perfectly however when I start the animation the NSImageView hops from its location to a random location. I do not
You need to set the position of the layer, on the Image View. Add this in the buttonPressed method:
//Position of the imgView
CGRect frame = _img.layer.frame;
float xCoord = frame.origin.x + frame.size.width;
float yCoord = frame.origin.y + frame.size.height;
CGPoint myPoint = CGPointMake(xCoord, yCoord);
_img.layer.position = myPoint;
[self startRefreshAnimation]
that way, you can move the imageView around in the .xib, and the animation will take place the correct spot.
Edit: The solution by @Nishant is so much prettier..