Has anyone tried matching the SwiftUI navigation t...
# compose-ios
c
Has anyone tried matching the SwiftUI navigation transition animations in a compose NavHost? I was playing around with it, and this seems pretty close - • Slide down 5px for 20ms • Then start a fade out/in & slide up 5px
Copy code
enterTransition = {
    slideInVertically(
        initialOffsetY = { 5 },
        animationSpec = tween(delayMillis = 20)
    ) + fadeIn(tween(delayMillis = 20, durationMillis = 20))
},

exitTransition = {
    slideOutVertically(
        targetOffsetY = { 5 },
        animationSpec = tween(durationMillis = 20)
    ) + fadeOut(tween(durationMillis = 20, delayMillis = 20))
},
👍 3
m
Cool, wanted to try the same soon. Will check it and let you know!
c
i was looking at the compose-cupertino library and noticed they use a BezierEasing in the tween spec as well -
Copy code
easing = CubicBezierEasing( 0.2833f, 0.99f, 0.31833f, 0.99f)