Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndefiniteProgressToastViewStyle has spinner constantly moving from top left to the toast #2

Closed
roddymunro opened this issue Aug 11, 2020 · 3 comments · Fixed by #3
Closed
Labels
bug Something isn't working

Comments

@roddymunro
Copy link

roddymunro commented Aug 11, 2020

Before I start, great repository here. It's been great to work with.

I've encountered a weird issue when implementing toast using IndefiniteProgressToastViewStyle() with a network request. For the duration of the request, the spinner will repeatedly move from the top left of the screen into the center of the toast. Once the request is complete, the toast disappears as expected.

Here's a gif of the issue: https://giphy.com/gifs/VgHGygxhGNeB3zIhS2

This is happening on iPhone 11 Pro Max simulator, Xcode 12 beta 4, iOS 14 beta 4.

Code example:

var body: some View {
        TabView(selection: $selection) {
            NavigationView {
                Text("my view")
            }
            .tabItem {
                Label("Test", systemImage: "book")
                    .imageScale(.large)
                    .accessibility(label: Text("Test"))
            }
        }
        .toast(isPresented: $showLoadingView) {
          ToastView("Loading...")
            .toastViewStyle(IndefiniteProgressToastViewStyle())
        }
        .onAppear {
            showLoadingView = true
            model.loadAllData { result in
                switch result {
                    case .success:
                        showLoadingView = false
                    case .failure(let error):
                        // show error stuff
                }
            }
        }
    }
@quanshousio
Copy link
Owner

Thank you for taking the time to try ToastUI, I truly appreciate that.

The bug is indeed reproducible on iOS 14 beta 4 but strangely not on iOS 13.6. I just pushed a fix (92035e9) on the hotfix-1.0.1 branch. Would you mind testing it out? If all goes well, I will merge back to the master branch.

@LucasCarioca
Copy link
Contributor

LucasCarioca commented Aug 12, 2020

Just tested on iOS 14 beta 4 and it is resolved in that hotfix branch 🎉

Screen Shot 2020-08-11 at 10 59 48 PM

@quanshousio quanshousio linked a pull request Aug 13, 2020 that will close this issue
@roddymunro
Copy link
Author

Yep that seems to have fixed it for me. Thank you for the quick resolution!

@quanshousio quanshousio added the bug Something isn't working label Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants