title: UIView invert mask MaskView
body: <p>I want to apply an inverted mask to my UIView. I set the mask to a UIImageView with a transparent image. However the output with</p>
  
  <pre><code>view.mask = imageView
  </code></pre>
  
  <p>is not the desired result. How can I achieve the desired result as I illustrated below? The desired result uses the mask cutout as transparency. When I check the mask of the View, it isn't a CAShapeLayer so I can't invert it that way.</p>
  
  <p><a href="https://i.stack.imgur.com/bbjXD.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/bbjXD.jpg" alt="An illustration of what happens vs what I want."></a></p>