Hi guys, I'm currently researching compose for my ...
# compose-ios
r
Hi guys, I'm currently researching compose for my company and a talk and stumbled across the current SwiftUI interop. Is there a way to integrate SwiftUI in compose and also update the SwiftUI component via a mutable state from kotlin site? I've used the "workaround" from here: https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-ios-ui-integration.html#use-swiftui-inside-compose-multiplatform
d
Hello! Yes, you used proper workaround for that! Also, in new version of Compose we will provide a better way to use UIViewController https://github.com/JetBrains/compose-multiplatform-core/pull/882 To use state, you can follow this article. One of our active users wrote it. https://proandroiddev.com/compose-multiplatform-managing-ui-state-on-ios-45d37effeda9
👍 1
j
Tried it myself, work bidirectional interop. However complex with coroutines and animations. No easy setup for that imo. Different approaches between Android and iOS. Easy to solve however.
👍 1