Akash
01/29/2024, 12:29 PMkpgalligan
01/29/2024, 4:39 PMUIViewController
is really Objc and not Swift. Kotlin has already "mapped" that, so you should be able to pass that in and interact with it from Kotlin.
However, I assume you mean an instance of UIViewController
that you've extended and added functionality to. That could get complex with cinterop.
As an alternative, create an interface in Kotlin that defines functions you'd like to call on your instance of UIViewController
, then implement the Kotlin interface in Swift. You can pass that back into KMM and call those functions. No cinterop required.Akash
01/30/2024, 4:59 AM