1
@IBAction func mirrorBtn(sender: AnyObject){
    self.makeMirroredImage(imageView)
    pickImage.image = imageView

}

func makeMirroredImage(image: UIImage) -> UIImage {
    var flippedOrientation: UIImageOrientation = .UpMirrored
    switch image.imageOrientation {
    case .Down:
        flippedOrientation = .DownMirrored
    case .Left:
        flippedOrientation = .LeftMirrored
    default :
        flippedOrientation = .LeftMirrored
    }

    let flippedImage: UIImage = UIImage(CGImage: image.CGImage!, scale: image.scale, orientation: flippedOrientation)
    return flippedImage
}
Asdrubal
  • 2,421
  • 4
  • 29
  • 37
nandini23
  • 81
  • 1
  • 9

1 Answers1

1

After the image is selected you should be able to invert it using a translation. I'm not a professional with iOS/swift, but in Android I accomplished this by setting the X and Y translation to -1. Hope this puts you on the right track

Ethan
  • 1,905
  • 2
  • 21
  • 50