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 linesIn the UIViewController:
main.swift697 chars24 linesNow the buttonTapped variable in the UIViewController will be modified when the button is tapped in the SwiftUI view.
gistlibby LogSnag