Home / IOS Development / Add UIButton programmatically to UIViewControllerRepresentable: iOSProgramming

Add UIButton programmatically to UIViewControllerRepresentable: iOSProgramming



I want to add a button to mine UIViewControllerRepresentable, as I need to perform some actions in a library that is only compatible with UIKit. IN UIKit I wanted to create the action with @objc, which can not be used in UIViewControllerRepresentable. How can I add an action to my UIButton?


Source link