If we have this SwiftUI View
:
Text("Hello")
Image("Some Image")
We have two View
s, and we refract them into a single one:
struct MyView: View {
var body: some View {
Text("Hello")
Image("Some Image")
}
}
If we use it in most cases, it is ordered into an implicit VStack
. But, if we do this:
List {
MyView()
}
SwiftUI will automatically split MyView
into two separate View
s.
My question is that if I have this:
@ViewBuilder
func pageView(_ views: () -> View) -> View {
}
How can I enumerate the child Views of the variable view just like in List?