I'm trying to implement a PresentationButton
in SwiftUI. I keep getting the following error:
Missing argument for parameter #1 in call Insert '<#Label#>, '
I am using Xcode Version 11.0 beta.
This is my SwiftUI file:
import SwiftUI
struct HomeList : View {
var body: some View {
ScrollView(showsHorizontalIndicator: false) {
HStack {
ForEach(0 ..< 5/) { item in
PresentationButton(destination: ContentView()) {
CourseView()
}
}
}
}
}
}
#if DEBUG
struct HomeList_Previews : PreviewProvider {
static var previews: some View {
HomeList()
}
}
#endif
struct CourseView : View {
var body: some View {
return VStack(alignment: .leading) {
Text("Build an app with Swift UI")
.font(.title)
.fontWeight(.bold)
.color(Color.white)
.padding(20)
.lineLimit(4)
.frame(width: 120)
Spacer()
Image("Illustration1")
}
.background(Color("background3"))
.cornerRadius(30)
.frame(width: 246, height: 360)
.shadow(color: Color("backgroundShadow3"), radius: 20, x: 0, y: 20)
}
}