title: Rotate the image by 180 degrees
body: <p>I have one image like drop down. Initially it will look like drop down image So when user press drop down list some option will show. So what I need is, when drop-down is true.I means when user press drop down image and when the list of option are showing down I need to show the drop down image to 180 degree.Same like when drop down is false I need to show the image as normal position.</p>
  
  <p>Is this way is correct instead of using one more image? I am using swift 2.2</p>
  
  <p>Updated :</p>
  
  <pre><code> @IBAction func dropBtnPress(sender: AnyObject) {
  
              if dropDown.hidden {
                  dropDown.show()
                  UIView.animateWithDuration(0.0, animations: {
                      self.image.transform = CGAffineTransformMakeRotation((180.0 * CGFloat(M_PI)) / 180.0)
                  })
              } else {
                  dropDown.hide()
      //            UIView.animateWithDuration(2.0, animations: {
      //                self.image.transform = CGAffineTransformMakeRotation((180.0 * CGFloat(M_PI)) / -180.0)
      //            })
              }
          }
  
      }
  </code></pre>