I am unable to rotate the image by 90 degrees in swift. I have written below code but there is an error and doesn\'t compile
func imageRotatedByDegrees(old
In Swift 4.2 and Xcode 10.0
dropDownImageView.transform = dropDownImageView.transform.rotated(by: CGFloat(Double.pi / 2))
If you want to add animation...
UIView.animate(withDuration: 2.0, animations: {
self.dropDownImageView.transform = self.dropDownImageView.transform.rotated(by: CGFloat(Double.pi / 2))
})