I've created an card and I want an image to display on top of each card except for the first one. please help me to solve this.
This is the struct that holds the image.
struct XButton: View {
var body: some View {
Image(systemName: "xmark")
.font(.system(size: 17, weight: .bold))
.foregroundColor(.white)
.padding(.all, 10)
.background(Color.black.opacity(0.6))
.mask(Circle())
}
}
This the scrollview that contains the cards inside the foreach loop
ScrollView{
ForEach(CardsData) { item in
VStack {
CardsView(Cards: item)
}
}
}
CardsViews except the first, correct?