Replies: 2 comments
-
Thought over this further and it might require #6 to be done beforehand, since that'd probably turn extension NavigationTransition {
@Builder
static var swing: Self {
let angle = Angle(degrees: 70)
let offset: CGFloat = 150
Move(axis: .horizontal)
Mirror {
OnInsertion {
Rotate(-angle)
Offset(x: offset)
Opacity()
Scale(0.5)
}
OnRemoval {
Rotate(angle)
Offset(x: -offset)
}
}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Done! #24 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is an idea that came to mind while writing #6.
Oftentimes pop transitions will just be the mirror version of push transitions, but they currently need to be defined explicitly every time. Perhaps there's a way to skip the pop implementation altogether and use the mirrored version of push instead. Something like
pop: .mirror
.Before:
After:
Implementation wise, I'm thinking this would require every transition instance to be mirrorable, which shouldn't be too hard to introduce as a requirement. However further thinking is needed on how exactly to do this without burdening developer experience too much.
Beta Was this translation helpful? Give feedback.
All reactions