When I use a list in my TabView in Xcode 11 project (all in SwiftUI), The app crashes if there is anything other than default Text() in the list when I try to change tabs/views(for example, I used a section with a header, and it crashed), followed by this error: precondition failure: imported node deleted before its value was read: 118.
I've looked at several posts with similar problems but nothing is useful/ no answers - I've tried calling it from an outside function but that doesn't work either.
section of the code:
TabView{
List {
Text("list item")
Section(header: Text("Important Tasks")){
Text("place")
}
}
.tabItem(){
Image(systemName: "house")
Text("Home")
}.tag(0)
CalendarView()
.tabItem(){
Image(systemName: "calendar")
Text("Calendar")
}.tag(1)
Everything displays properly in the first view (HomeView(), the code I showed above) but if i try to switch tabs/views, the app instantly crashes, followed by this error:
precondition failure: imported node deleted before its value was read: 118