I am wondering if it's possible drawing something with CGContext and CanvasView in SwiftUI instead using UIKit, like this tutorial.
Do I have to integrate UIKit for doing that?
Do I have to integrate UIKit for doing that?
SwiftUI does not provide access to CGContext
, consider it as a descriptive model, so yes, you have to integrate UIKit via UIViewRepresentable
for doing that.