https://kotlinlang.org logo
#compose
Title
# compose
s

Shoaib khalid

10/22/2023, 12:58 PM
How can i override activity lifecycle methods in a composable? i've a composable called "HomeScreen" now i want to have all activity lifecycle methods in it. Currently i've ios and android in commonMain.
z

Zach Klippenstein (he/him) [MOD]

10/23/2023, 3:26 AM
You can use LocalLifecycleOwner to get access to the Lifecycle and register listeners on there
s

Shoaib khalid

10/23/2023, 7:35 AM
i tried but that seems to be not working in ios.
z

Zach Klippenstein (he/him) [MOD]

10/23/2023, 4:29 PM
Oh yea, because that’s an android concept
I have no idea what would be the analogous concept on ios, or how to access it via compose. You might want to post in #compose-ios
👍 1