I do an animation of rotation from the button starts, but the arrow returns to its initial position, how to leave it where it stopped? Code https://yadi.sk/d/4h6Z2DlcuAK3u

    1 answer 1

    Add these two lines to the func rotateLayer(currentLayer:CALayer){} method:

     theAnimation.removedOnCompletion = false theAnimation.fillMode = kCAFillModeForwards