Post

Replies

Boosts

Views

Activity

SwiftUI Listview With Children Error
I created ListView like this struct LayerGroup: Identifiable {   let id = UUID()   var LayerId: Int   var Visible: Bool   var Active: Bool   var Labelled: Bool   var ProjectLayerGroupId: Int } struct MapLayerGroup :Identifiable{   var id = UUID()   var CanBeDeleted: Bool   var ListOrder: Int   var Mutual: Bool   var Name: String   var ProjectId: Int   var ProjectLayerGroupId: Int   var Xaml: String   var LayerGroups : [LayerGroup]? } var body: some View {         HStack{ //mapLayerGroups is collection of MapLayerGroup and populated           List(mapLayerGroups, children: \.LayerGroups) { layer in             Text(layer.Name)           }         } } This will return Failed to produce diagnostic for expression; please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project I do not see what is wrong with the object and list. Is there any that i missed ? I use XCode 12.5
1
0
1.4k
Jun ’21