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
@Asdrubal 미러링 기능이 있습니다. 작동하지 않습니다. – nandinibm
이 같은 것을 의미합니까? http://stackoverflow.com/questions/10936590/flip-nsimage-on-both-axes –