title: Animate button 360 clockwise and reverse back
body: <p>Animate a button 360 degree clockwise and then reverse the animation to 360 counterclockwise.But doesnot animation...The animation is always 360 clockwise direction.</p>
  
  <pre><code>func animateShowingOfMenu(){
  
          let angle = CGFloat(180 * M_PI / 180)
          UIView.animateWithDuration(0.4
              , animations: { () -&gt; Void in
  
                  self.blurView.hidden=false
                  self.menuBtn.transform = CGAffineTransformMakeRotation(angle)
                  self.menuBtn.transform = CGAffineTransformMakeRotation(0)
  
  
              }) { (completion) -&gt; Void in
  
                  print("compeleted")
          }
  
      }
  
      func animateHidingOfMenu(){
  
          let angle = CGFloat(-180 * M_PI / 180)
          UIView.animateWithDuration(0.4
              , animations: { () -&gt; Void in
  
                  self.blurView.hidden = true
                  self.menuBtn.transform = CGAffineTransformMakeRotation(angle)
                  self.menuBtn.transform = CGAffineTransformMakeRotation(0)
  
  
              }) { (completion) -&gt; Void in
  
          }
      }
  </code></pre>