- 
                Notifications
    
You must be signed in to change notification settings  - Fork 47
 
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
Pre-requisites:
- Yes, I looked through both open and closed issues looking for what I needed.
 - No, I did not find what I was looking for.
 
Expected Behavior
Be able to show the ToastUI at app load. Useful when doing initial network requests like auth or other early tasks
Current Behavior
Currently the ToastUI does not appear
Steps to Reproduce
struct TestView: View {
    @State private var isLoading: Bool = false
	
    var body: some View {
        VStack {
            Text(isLoading ? "Please wait..." : "Got auth token")
                .padding()
            Spacer()
        }
        .toast(isPresented: $isLoading) {
            ToastView("Loading").toastViewStyle(.indeterminate)
        }
        .onAppear {
            self.isLoading = true
        }
    }
}Context
I basically want to open the app and the ToastUI to be visible until some network requests are done in the background
Disclaimer: I'm still new to SwiftUI so i might try to achieve this the wrong way
Your Environment
- Swift Version: 5.5
 - Xcode Version: 13.4
 - Operating System Version: macOS Monteray 12.4
 - Device or Simulator: Irrelevant
 
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed