title: How to animate UIView from top to bottom and vice versa?
body: <p>I'm trying to animate UIImageView from top to bottom and vice versa.
  I tried the code:</p>
  
  <p>Previous value was(<code>y == 0</code>):</p>
  
  <pre><code>laserImageView.frame = CGRect(x: 0, y: 0.0, width: 300.0, height: 300.0)
  </code></pre>
  
  <p>and want to animate it to <code>500.0</code>:</p>
  
  <pre><code>UIView.animate(withDuration: 3.0, delay: 0.2, options: [.curveEaseInOut], animations: {
      laserImageView.frame = CGRect(x: 0, y: 500.0, width: 300.0, height: 300.0)
  }) { (finished) in
      if finished {
          // Repeat animation from bottom to top
      }
  }
  </code></pre>
  
  <p>but when I run my app the UIImageView appears at the last point(<code>y == 500</code>) without any animation, like the initial position was <code>500.0</code> but not <code>0.0</code>.</p>
  
  <p>I do not understand why animation does not work. Any idea?</p>