Answer the question
In order to leave comments, you need to log in
Error in xcode "Type 'RoundedRectangle.Type' cannot conform to 'View'"?
import SwiftUI
struct ContentView: View {
var body: some View {
HStack {
CardView ()
CardView ()
CardView ()
CardView ()
CardView ()
}
.padding(.horizontal)
.foregroundColor(/*@[email protected]*/.red/*@[email protected]*/)
}
}
struct CardView: View {
var body: some View {
ZStack {
RoundedRectangle(cornerRadius:20).stroke(lineWidth:3)
Text("Hello, world")
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question