-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Idea
Currently, we only support two screen presentation styles: push and sheet. We could add a way to define custom screen presentation styles.
Problem description
Custom screen presentation styles are a bit tricky as they involve local state for animation. SwiftUI defines animations on a view basis and we could come up with something along the lines of
protocol ScreenTransition: Hashable {
func animatedContent<Content: View>(content: Content, isVisible: Bool) -> some View
}
struct FullScreenCoverTransition: ScreenTransition {
func animatedContent<Content: View>(content: Content, isVisible: Bool) -> some View {
content
.animationModifiers() // do whatever you want here
}
}We would then need to plug this into NavigationNode and make sure that we properly perform the animation on show and dismiss.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request