Given the following code
import SwiftUI
struct Foo: View {
var body: some View {
Text("Hello World")
}
}
let anyViewFoo = AnyView(Foo())
debugPrint(anyViewFoo)
Is it possible to check foo for the "real" type or e.g. cast to Foo? So something (which obviously doesn't work) like the following would be awesome:
let foo: Foo? = anyViewFoo as? Foo
Does something like this exist?
