Wim*_*nsa 15 ios uistoryboardsegue swift swiftui
我正在尝试创建SwiftUI自定义的segue动画,像这样
我尝试将动画链接到,Destination但没有用,它只是Destination在演示动画完成后在内容内设置动画。
struct ContentView : View {
var body: some View {
NavigationView {
VStack {
List {
NavigationButton(destination: withAnimation{
Destination()
}.frame(width: 300, height: 300)
.animation(.basic())) {
CellView()
}
}
}
}
}
}
struct CellView : View {
var body: some View {
VStack {
Text("Cell")
}
}
}
struct Destination : View {
var body: some View {
VStack {
Text("GFD")
}
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
303 次 |
| 最近记录: |