【发布时间】:2020-04-12 07:15:22
【问题描述】:
我有一个代码并制作了 NavigationLink 按钮,我编写了文本和图像,但我的图像看不到。请帮助我。
VStack{
Image("Coachs")
.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: 370, height: 200)
//.clipped()
.cornerRadius(20.0)
NavigationLink(destination: Text("Detail view here")){
ZStack{
Text("Press on me")
.foregroundColor(.white)
.font(.largeTitle)
Image("Coachs")
.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: 370, height: 200)
//.clipped()
.cornerRadius(20.0)
}
}}
【问题讨论】:
标签: swift swiftui navigationlink