-
Notifications
You must be signed in to change notification settings - Fork 47
Description
When using any fade transition (.fade(), .fade(.cross), etc.) on a NavigationStack that contains NavigationLinks with shadowed elements, there's a noticeable grey flash during the transition. This only occurs when the shadowed elements have a white background.
Environment
- iOS 18.5
- SwiftUI
- swiftui-navigation-transitions 0.15.1
- Xcode 16.2
Reproduction Steps
-
Create cards with white background and shadows:
.background(Color.white)
.cornerRadius(20)
.shadow(color: Color.black.opacity(0.15), radius: 0.5, x: 1, y: 1.5)
.shadow(color: Color.black.opacity(0.25), radius: 1, x: 0, y: 0) -
Apply fade transition to NavigationStack containing these cards:
NavigationStack {
// content with NavigationLinks containing shadowed cards
} .navigationTransition(.fade(.cross)) // or .fade(), etc. -
Tap on a card to navigate - observe a brief grey flash appears during the transition, specifically where shadows are rendered on white background.