How do I render a SwiftUI View that is not at the root hierarchy as a UIImage?
Here is the approach that works for me, as I needed to get image exactly sized as it is when placed alongside others. Hope it would be helpful for some else. Demo: above divider is SwiftUI rendered, below is image (in border to show size) Update: re-tested with Xcode 13.4 / iOS 15.5 Test module … Read more