I’m trying out the konan iOS sample app, and hoping I can create a view and set its attributes directly from kotlin, without going through Storyboards.
Another thing I’m not sure how to do is how to set an action for a UIButton without going through the Storyboard.
I have the button object
button, and trying to set its target selector by calling:
button.addTarget(this, action=::buttonPressed, forControlEvents=UIControlEventTouchDown)
The action selector gives this error message:
Type mismatch: inferred type is KFunction0 but COpaquePointer? /* = CPointer? */ was expected
::buttonPressed was the closest I got to a selector in kotlin, could you advice on how to achieve this?