Friday, July 5, 2024
HomeiOS Developmentios - SwiftUI transfer transition not clean

ios – SwiftUI transfer transition not clean


I’ve the next code within the view physique:

  VStack {
      ...
  }
   .fixedSize(horizontal: false, vertical: true)
   .clipped()
   .background {
       Coloration.blue
   }
   .persistentSystemOverlays(.hidden)
   .transition(.transfer(edge: .backside))

The view is proven as an overlay within the superview as follows:

  .overlay(alignment: .backside, content material: {
        if showColorCorrectionMenu {
            ColorCorrectionMenu()
             .ignoresSafeArea(edges: [.bottom]).body(peak:170)
         }
   }

And after I dismiss it from mother or father view, I execute the next code:

 withAnimation(.easeInOut(length:0.3)) {
             showColorCorrectionMenu.toggle()
 }

Whereas the transition occurs, I count on the view to maneuver away from the display. However the transition is bizarre. The view slides down after which glints to fade out. I have no idea tips on how to simply present the slide down animation with out fadeout. Hooked up is gif picture of animation.

enter image description here



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments