title: How do you make a shake animation for a button using Swift 3
body: <p>I have a function that gets called every 3 seconds. How can I make a shaking animation for the <em>button</em> that shakes side to side.</p>
  
  <pre><code>func shakeButton() {
      if opened == false {
          //Shake Animation
      }
  }
  </code></pre>