我是按照这个教程(https://www.youtube.com/watch?v=GiCTgsH0dtk),并得到了这个错误,任何人都知道一个工作周围的其他人在评论中有麻烦与同样的事情,所以我认为id帮助
您知道处理这段代码的新错误的正确方法吗?
NavigationLink(destination: SignUp(show: self.$show), isActive: self.$show) {
Text("")
}
.hidden()
Login(show: self.$show)
}
错误:
“init(destination:isActive:label:)”在iOS 16.0中已弃用:在导航堆栈或导航拆分视图中使用导航链接(值:标签:)
1条答案
按热度按时间h7appiyu1#
First, change your
NavigationLink
toNavigationStack
. And lastly, where your - if you have one -.navigationTitle("")
goes (this is whereNavigationView
closes), Xcode is asking you to add a.navigationDestination()
as following:This alert, not error, happens because of iOS 16 and Apple's constant changes on the Swift and Swift's frameworks changes.