title: How to apply multiple transforms in Swift
body: <p>I would like to apply multiple transforms to a <code>UIView</code> (or subclass of <code>UIView</code>), such as translate, rotate, and scale. I know that two transforms can be applied with <a href="https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGAffineTransform/#//apple_ref/c/func/CGAffineTransformConcat" rel="noreferrer"><code>CGAffineTransformConcat</code></a>, but how do I do it if I have three or more transforms?</p>
  
  <p>I have seen these questions:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/1111277/applying-multiple-transforms-to-a-uiview-calayer">Applying multiple transforms to a UIView / CALayer</a></li>
  <li><a href="https://stackoverflow.com/questions/6047972/using-multiple-cgaffinetransforms-on-text-matrix">Using Multiple CGAffineTransforms On Text Matrix</a></li>
  </ul>
  
  <p>but these questions are asking something different, and the given answers just talk about applying two transforms with <code>CGAffineTransformConcat</code>. Also, they use Objective-C rather than Swift.</p>