Post

Replies

Boosts

Views

Activity

Comment on Method to return a generic View type in SwiftUI
It's easy to think it should work that way - mostly because it should. Since they're structs, there's no path of ancestry. However, as structs are told to act a certain way - ostensibly following an interface. " : (some) View" SHOULD mean "I can use this where ever I can use a View." It should work that way. It does not because you're not in a world where you can say something like "this thing IS A view", but rather "this thing ACTS LIKE a view". Small but important distinction. :\
Jun ’22