UIImage Orientation Swift
问题 I have written this code to capture an image using the AVFoundation library in Swift: @IBAction func cameraButtonWasPressed(sender: AnyObject) { if let videoConnection = stillImageOutput.connectionWithMediaType(AVMediaTypeVideo){ stillImageOutput.captureStillImageAsynchronouslyFromConnection(videoConnection){ (imageSampleBuffer : CMSampleBuffer!, _) in let imageDataJpeg = AVCaptureStillImageOutput.jpegStillImageNSDataRepresentation(imageSampleBuffer) var pickedImage: UIImage = UIImage(data: