gpt4 book ai didi

SwiftUi - 隐藏 "Back"按钮和导航栏(出现几分之一秒)

转载 作者:行者123 更新时间:2023-12-04 01:24:19 25 4
gpt4 key购买 nike

我正在使用此代码隐藏导航栏和后退按钮,但是当 View 加载时,我仍然可以看到后退按钮几分之一秒然后消失。有什么办法可以防止它显示出来吗?

var body: some View {
NavigationView {
NavigationLink(destination: DeferView { WeekView(journey: self.launcher.completeJourney!) }, isActive: self.$launcher.readyJourney ) { EmptyView () }
.navigationBarHidden(true)
.navigationBarTitle("")
}
}

先感谢您,

最佳答案

也为链接目的地添加相同的修饰符,

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("")
}
}

关于SwiftUi - 隐藏 "Back"按钮和导航栏(出现几分之一秒),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62158125/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com