arkivanov / Essenty

The most essential libraries for Kotlin Multiplatform development
Apache License 2.0
482 stars 15 forks source link

Add UIViewController lifetime hooks #110

Closed francismariano closed 11 months ago

francismariano commented 11 months ago

The version 1.5.10-beta01 of compose added UIViewController lifetime hooks (see https://github.com/JetBrains/compose-multiplatform-core/pull/779)

It is possible to do similar thing for essenty??

arkivanov commented 11 months ago

Yes, I think you can drive LifecycleRegistry using those callbacks.

arkivanov commented 11 months ago

You can use extension functions like LifecycleRegistry#create, LifecycleRegistry#resume, LifecycleRegistry#stop and LifecycleRegistry#destroy.

arkivanov commented 11 months ago

But, if I understand it correctly, you can actually create and drive LifecycleRegistry in Swift, which might be better.

arkivanov commented 11 months ago

Closing this for now. Feel free to reopen if there are any issues.