title: Animation to scale and move UIView (swift)
body: <p>I have a UIView, placed in the middle of the screen. When the user presses a button, I want it to move up near top of the screen as it shrinks to about a fifth of its size. </p>
  
  <p>I have tried this:</p>
  
  <pre><code>UIView.animateWithDuration(0.7) { () -&gt; Void in
              self.main.transform = CGAffineTransformMakeScale(0.2, 0.2)
              self.main.transform = CGAffineTransformMakeTranslation(0, -250)
          }
  </code></pre>
  
  <p>But for some reason, that only scales the view. I have also tried to put this in the animateWithDuration:</p>
  
  <pre><code>self.main.frame = CGRectMake(self.view.frame.width/2 - 10, 50, 50, 50)
  </code></pre>
  
  <p>How can I get both animations to work?</p>