I have the following code in the view body:
VStack {
...
}
.fixedSize(horizontal: false, vertical: true)
.clipped()
.background {
Color.blue
}
.persistentSystemOverlays(.hidden)
.transition(.move(edge: .bottom))
The view is shown as an overlay in the superview as follows:
.overlay(alignment: .bottom, content: {
if showColorCorrectionMenu {
ColorCorrectionMenu()
.ignoresSafeArea(edges: [.bottom]).frame(height:170)
}
}
And when I dismiss it from parent view, I execute the following code:
withAnimation(.easeInOut(duration:0.3)) {
showColorCorrectionMenu.toggle()
}
While the transition happens, I expect the view to move away from the screen. But the transition is weird. The view slides down and then flickers to fade out. I do not know how to just show the slide down animation without fadeout.