There is one big thing that confuses me about view types in SwiftUI:
They don\'t seem to conform to the View
protocol, but somehow, they mysterious
SwiftUI view types ARE conforming to the View
protocol, otherwise as you mentioned the code wouldn't compile. I found some of these which were available in SwiftUI public extensions:
Image
type has an extension which directly conforms to View
:
extension Image : View {
}
Circle
conforms to Shape
, which itself conforms to View
:
public struct Circle : Shape {
...
}
public protocol Shape : Equatable, Animatable, View {
...
}