Hello guys , how to handle UIButton click in a kmm...
# ios
b
Hello guys , how to handle UIButton click in a kmm project ios
a
many questions, is this a kmm project with jetbrains compose? or are you consuming a kmm project like a library? How do you handle a button click in iOS natively? usually you forward the event to your viewmodel/viewcontroller. The same principle in kmm, the only difference is you pass the event to the kmm view model. So your viewmodel would have a function
Copy code
fun handleButtonClick()
and then in your swiftui you would do
Copy code
viewmodel.handleButtonClick()