I am trying to build out a custom scroll view that can take in different cells I have created and present those in the scroll view. I cannot figure out how to pass a generic SwiftUI view into the constructor of my custom scroll view struct, is it possible to do this? some like this:
struct CustomScroll<Content: View>: View {
var genericCell: View
var body: some View {
VStack(spacing: 10) {
ForEach(0...7, id: \.self){ index in
VStack(spacing: 10){
cell
}
}
}
}
}