danmihai
(Dan)
1
I was reading code in the SwiftUI framework and I don't understand what's the meaning/role of the type alias at line 65692 here:
Could you please explain? Thank you!
danmihai
(Dan)
3
So it needs to distinguish between Body and Content, because even known they both conform to View protocol if the signature had been func body(Cotent:) -> Cotent, the method would have been obligated to return the very same type of View? While obviously a modifier might change that?
Hope I'm getting it right.
mayoff
(Rob Mayoff)
4
In short the rhs of that typealias is missing as it refers to a public type which is prefixed by an underscore and therefore also hidden from us.
typealias Content = SwiftUI._ViewModifier_Content<Self>
2 Likes