title: How to convert a View (not UIView) to an image?
body: <p>Similar to this thread: <a href="https://stackoverflow.com/questions/30696307/how-to-convert-a-uiview-to-an-image?answertab=active#tab-top">How to convert a UIView to an image</a>.</p>
  <p>I would like to convert a <code>SwiftUI View</code> rather than a <code>UIView</code> to an image.</p>