What is the code doing? Is it drawing to a CGContext as you would in a UIView.draw method? If so, it sounds like you have to use UIViewRepresentable to create a UIView that you can then use in a SwiftUI View hierarchy.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: