UI changes with ObservableObject just after switching tabs
问题 I have a ObservableObject that I use to update my UI when new data is sent from the server (an a class which contains an array of custom structs). For some reason, when the data is sent, the ContentView 's body is called, but the data isn't changed. I even added a print statement to check if the data that the array contains is right and it is. When I try to switch to another tab on my TabView , and then switch back to the main view, the UI does get updated. Does anybody know why the UI