eug*_*prg 5 navigationbar swiftui navigationlink swiftui-navigationlink
我使用此代码来隐藏导航栏和后退按钮,但是当加载视图时,我仍然可以看到后退按钮一小会儿,然后它就消失了。有什么办法可以阻止它被显示吗?
var body: some View {
NavigationView {
NavigationLink(destination: DeferView { WeekView(journey: self.launcher.completeJourney!) }, isActive: self.$launcher.readyJourney ) { EmptyView () }
.navigationBarHidden(true)
.navigationBarTitle("")
}
}
Run Code Online (Sandbox Code Playgroud)
先感谢您,
也为链接目标添加相同的修饰符,
var body: some View {
NavigationView {
NavigationLink(destination: DeferView { WeekView(journey: self.launcher.completeJourney!) }
.navigationBarHidden(true) // here !!
.navigationBarTitle("") // here !!
, isActive: self.$launcher.readyJourney ) { EmptyView () }
.navigationBarHidden(true)
.navigationBarTitle("")
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3638 次 |
| 最近记录: |