title: rotate image on button press
body: <p>I'm trying to rotate and image 180 degrees when a button is pressed. Right now  I can get it to rotate the 180, but when I press the button again, the image doesn't rotate back. I feel that I'm missing something simple.</p>
  
  <p>The if statement is working, i just simplified the code and only left in the part that isn't working.</p>
  
  <pre><code>        if(self.dropdownConstraint.constant == -78)
      {
          //roate arrow up
          UIView.animateWithDuration(0.5, animations: {
              self.arrow.transform = CGAffineTransformMakeRotation((180.0 * CGFloat(M_PI)) / 180.0)
              self.view.layoutIfNeeded()
          })
      }
      else
      {
          //roate arrow down
          UIView.animateWithDuration(0.5, animations: {
              self.arrow.transform = CGAffineTransformMakeRotation((-180.0 * CGFloat(M_PI)) / -180.0)
              self.view.layoutIfNeeded()
          })            
      }
  </code></pre>
  
  <p>Thanks in advance!</p>