title: Rotating UIImage in Swift
body: <p>I'm using Xcode 6.0.1 with Swift. I have a UIImage, and I would like to make another image using the old image as a source, with the new image being rotated in some way... say flipped vertically.</p>
  
  <p>This question was already answered <a href="https://stackoverflow.com/questions/24965638/how-to-flip-uiimage-horizontally-with-swift">a few months ago</a>. However, that solution doesn't work for me, even though the situation is identical.</p>
  
  <p>When I have </p>
  
  <pre><code>var image = UIImage(CGImage: otherImage.CGImage, scale: 1.0, orientation: .DownMirrored)
  </code></pre>
  
  <p>Xcode complains that there's an "Extra argument 'scale' in call". After checking with the Apple documentation, this makes no sense, as that version of the initializer does take those three arguments. Leaving out the scale and orientation arguments does fix the problem, but prevents me from doing the rotation.</p>
  
  <p>The only other reference to this that I can find is <a href="https://github.com/acani/Chats/issues/43" rel="noreferrer">this guy</a>, who had the same problem.</p>
  
  <p>What do you think?</p>
  
  <p>I do need this to run on this version of Xcode, so if there's an alternate way to perform the rotation (I haven't found one yet) that would be useful.</p>