قالب وردپرس درنا توس
Home / IOS Development / ios – SwiftUI adds custom UIViewControllerTransitionDelegate

ios – SwiftUI adds custom UIViewControllerTransitionDelegate



I try to make SwiftUI custom segue animation, like this

  post image description here

I try to link the animation to Destination but not use, it animates just inside the contents of Destination after the presentation of the animation is finished.

  struct ContentView: View {
was body: some show {
NavigationView {
VStack {
List {
NavigationButton (destination: withAnimation {
Target()
} frame (width: 300, height: 300)
.animation (.based ())) {
CellView ()
}
}
}
}

}
}

struct CellView: View {
was body: some show {
VStack {
Text ("Cell")
}
}
}

structure Destination: show {
was body: some show {
VStack {
Text ("GFD")
}
}
}


Source link