Examine the View Hierarchy Debugger in Xcode. Then create a Core Graphics context, draw into it and extract an image.
This is a companion discussion topic for the original entry at https://www.kodeco.com/31558295-supporting-swiftui-with-core-graphics/lessons/2