Remove animation in swift
<p>I have a text field where user should enter info. And a label which points user to text field (like a hint). </p>

<p>I want to stop animation and remove hint label once user presses the text field to enter data.</p>

<p>There is repeating animation on text label. Was created by:</p>

<pre><code>override func viewDidLoad() {
    super.viewDidLoad()

    textInput.addTarget(self, action: #selector(CalculatorViewController.removeAnimation(_:)), forControlEvents: UIControlEvents.TouchDown)

     self.hintLabel.alpha = 0.0

    UIView.animateWithDuration(1.5, delay: 0, options: .Repeat
        , animations: ({
        self.hintLabel.alpha = 1.0
    }), completion: nil           
    )
</code></pre>

<p>After it I have created a function to remove annotation</p>

<pre><code>func removeAnimation(textField: UITextField) {
    view.layer.removeAllAnimations()
    self.view.layer.removeAllAnimations()
    print("is it working?!")
}
</code></pre>

<p>Should work according to documentation. </p>

<p><a href="https://i.stack.imgur.com/CXfZm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/CXfZm.png" alt="enter image description here"></a></p>

<p>My label keeps flashing even though I see the string printed in console. I guess problem is that animation is repeated but have no clue how to resolve this issue.</p>