Cannot create a SwiftUI Table with more than 10 columns, attempts to use Group do not work .... HELP
Trying to overcome the 10 columns limit of Table in SwiftUI, I am trying to use Group to split the number of Views by group of 10. This generate a compiler error: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions Here is the code import SwiftUI //--------------------------------------------------------------------------------------------- struct TestStruct : Identifiable { var id = UUID () var name : String var val : Int } //--------------------------------------------------------------------------------------------- struct ContentView: View { @State var testData : [ TestStruct ] = [ TestStruct ( name: Leopold, val: 1 ), TestStruct ( name: Napoleon, val: 2 ) ] var body: some View { VStack { Table ( testData ) { Group { TableColumn ( Name ) { testStruct in Text ( testStruct.name ) } TableColumn ( Value ) { testStruct in Text ( String ( testStruct.val ) ) } } } } } } //---------------------------------------------------