Post

Replies

Boosts

Views

Activity

Reply to Loading View on API call
Make your getHomeItems() with a closure when done, and try something like this: .onAppear { self.showLoading = true DispatchQueue.main.async { store.getHomeItems() { _ in // <--- here self.showloading = false // <--- here } } ... }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’21
Reply to Loading View on API call
Make your getHomeItems() with a closure when done, and try something like this: .onAppear { self.showLoading = true DispatchQueue.main.async { store.getHomeItems() { _ in // <--- here self.showloading = false // <--- here } } ... }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’21