0
I am able to to populate my SwiftUi with this code in the ContentView with no problems. What I am trying to do is to recall my Array in a ForEach loop as a Function Call
Can someone tell me on how I can recall my @ObservedObject var networkStoryManager = StoriesNetworkManager()
struct ContentView: View {
@ObservedObject var networkStoryManager = StoriesNetworkManager()
var body: some View {
VStack{
List(networkStoryManager.stories) { story in
Text(story.event)
}
.padding(.leading)
.navigationBarTitle("Story")
.frame(minWidth: 0, maxWidth: 400, minHeight: 0, maxHeight: 595)
}
.onAppear {
self.networkStoryManager.fetchStoryData()
}
}
}