In SwiftUI a Form has a limitation of 10 child Items. When you add more than 10 items it will throw the error below. And this is not only for Form, this is true for all over SwiftUI.
"Trailing closure passed to parameter of type 'FormStyleConfiguration' that does not accept a closure"
Copy struct ContentView : View {
var body: some View {
Form {
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
}
}
}
Copy struct ContentView : View {
var body: some View {
Form {
Group {
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
}
Group {
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
}
}
}
}
...
Using Group to overcome that limitation does not make any difference in view. Both look the same as below.
...
Copy struct ContentView : View {
var body: some View {
Form {
Section {
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
}
Section {
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
Text ( "Hello, world!" )
}
}
}
}
...