Post

Replies

Boosts

Views

Activity

Reply to SwiftUI Table Limit of Columns?
One way to this is to use multiple TableColumnBuilder objects. Using Group removes the ability to sort via the column headers, and fancy column customization was failing for me too. TableColumnBuilders also create more easily organized code. https://developer.apple.com/documentation/swiftui/tablecolumnbuilder/ @TableColumnBuilder<ObjectType, KeyPathComparator<ObjectType>> var tableColumns1: some TableColumnContent<ObjectType, KeyPathComparator<ObjectType>> { TableColumn( ... Table(of: ObjectType.self, selection: $selection, sortOrder: $sortOrder, columnCustomization: $columnCustomization) { tableColumns1 tableColumns2 tableColumns3 } rows: { ForEach(filteredCompositions) { obj in TableRow(obj) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’23
Reply to SwiftUI Table Limit of Columns?
One way to this is to use multiple TableColumnBuilder objects. Using Group removes the ability to sort via the column headers, and fancy column customization was failing for me too. TableColumnBuilders also create more easily organized code. https://developer.apple.com/documentation/swiftui/tablecolumnbuilder/ @TableColumnBuilder<ObjectType, KeyPathComparator<ObjectType>> var tableColumns1: some TableColumnContent<ObjectType, KeyPathComparator<ObjectType>> { TableColumn( ... Table(of: ObjectType.self, selection: $selection, sortOrder: $sortOrder, columnCustomization: $columnCustomization) { tableColumns1 tableColumns2 tableColumns3 } rows: { ForEach(filteredCompositions) { obj in TableRow(obj) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’23
Reply to Protocols and Associated Existential Types - Compiler and/or user problem?
Seems to be a compiler bug -- https://github.com/apple/swift/issues/60900
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’22