gpt4 book ai didi

ios - NavigationLink 和 PresentationLink 错误

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:10:16 24 4
gpt4 key购买 nike

我正在研究 Apple 网站上的 SwiftUI 教程。

this 实现的演示网址。

它为 NavigationLink 和 PresentationLink 抛出错误。

下面是我的正文段落代码,

var body: some View {
NavigationView {
List {

FeaturedLandmarks(landmarks: featured)
.scaledToFill()
.frame(height: 200)
.clipped()
.listRowInsets(EdgeInsets())
ForEach(categories.keys.sorted().identified(by: \.self)) { key in
CategoryRow(categoryName: key, items: self.categories[key]!)

}
.listRowInsets(EdgeInsets())
NavigationLink(destination: LandmarkList()) {
Text("See All")
}
}
.navigationBarTitle(Text("Featured"))
.navigationBarItems(trailing:
PresentationLink(destination: Text("User Profile")) {
Image(systemName: "person.crop.circle")
.imageScale(.large)
.accessibility(label: Text("User Profile"))
.padding()
}
)
}
}
}

enter image description here enter image description here

感谢任何帮助!

最佳答案

您应该使用 Xcode 11 beta 3。您提到的组件名称在 beta 2 之后被更改。

关于ios - NavigationLink 和 PresentationLink 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56901396/

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