I am trying to create a structure in Swift:
struct foo: Identifiable {
var id = UUID()
var someView: View
}
Here someView is any kind of SwiftUI View struct. But Xcode will raise error
Protocol 'View' can only be used as a generic constraint because it has Self or associated type requirements
How to declare a property that follow a specific protocol in Swift?