Andreas Jost
11/25/2019, 10:24 AMactual fun ViewContainer.setOnCLickListener(block: () -> Unit) {
val funRef = StableRef.create(InvokeClickListener(block))
this.addGestureRecognizer(UITapGestureRecognizer(this, funRef.asCPointer()))
}
class InvokeClickListener(private val block: () -> Unit) : () -> Unit {
override operator fun invoke() {
block()
}
}
I already managed to set the visibility of Views in the common code. If interested I can post code snippets in the multiplatform channel. But this case is harder, because UITapGestureRecognizer wants a selector/COpaquePointer and I can't find a solution.svyatoslav.scherbina
11/26/2019, 2:14 PM