iOS enter animation for Dialog seems not to be working
Hi, I've been trying to add a simple dialog in the commonMain part of my composable multiplatform application but when I test it on an iOS emulator (Iphone 16 iOS 18) the enter animation of the dialog and the scrim seems not to be working. The exit animation works fine though.
I'm using version 1.19.1.
val dialogState = rememberDialogState(true)
Dialog(dialogState){
Scrim(
enter = fadeIn(tween(durationMillis = 250)),
exit = fadeOut(tween(durationMillis = 150)),
)
DialogPanel(
enter = scaleIn(initialScale = 0.8f) + fadeIn(tween(durationMillis = 250)),
exit = scaleOut(targetScale = 0.6f) + fadeOut(tween(durationMillis = 150)),
){
Text("Hello")
}
}
Thanks for opening this issue.
Turns out Dialogs behave a bit different on iOS than the other platforms.
I've tried tackling this a few times and still haven't figured out what is the reason this is happening. It seems like an issue in Compose itself, but I cannot figure this out yet.
Is this blocking you?
Closing due to inactivity. Also seem related to this bug on CMP
is there any news for this issue? I can still reproduce it
Opened a bug report on Compose Multiplatform. Kindly star the issue if you want to see it fixed: https://youtrack.jetbrains.com/issue/CMP-7666/AnimatedVisibility-does-not-work-the-same-on-iOS-as-on-Android-and-JVM
Re-opening this until the issue on CMP is fixed.
Even though this is blocked from us to fix, it's work keeping open for visibility.
~~This seems to be worked on from CMP's side: https://youtrack.jetbrains.com/issue/CMP-4365/iOS-Enter-and-exit-animation-for-Dialog~~
EDIT: Seems like my original issue was mistaken for asking for the built in Dialog to have animations. Chasing folks about this to move it forward.
This is no longer blocked by CMP. It is a bug from our side that we should be able to address