You can pass a @Binding
variable to the SwiftUI view from the UIViewController and modify that variable on button action. Here is an example:
In the SwiftUI view:
main.swift212 chars12 lines
In the UIViewController:
main.swift697 chars24 lines
Now the buttonTapped
variable in the UIViewController will be modified when the button is tapped in the SwiftUI view.
gistlibby LogSnag