As the questions says I want to navigate to another view without NavigationButton, something like "pushView" and "popView" in UIkit
我认为这更像是一种限制的解决方法,但它对我有用:
添加一个布尔状态变量,用于定义链接是否处于活动状态。例如:
@State private var showLinkTarget = false
Run Code Online (Sandbox Code Playgroud)
添加一个不可见的 NavigationLink,如下所示:
NavigationLink(destination: LinkTargetView(), isActive: self.$showLinkTarget ) {
Spacer().fixedSize()
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2730 次 |
最近记录: |