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

The addTapHandler is not working if the show contains a delay (because of async Spinner hard to return I guess) #123

Open
MarcHe124 opened this issue Feb 10, 2018 · 1 comment

Comments

@MarcHe124
Copy link

No description provided.

@andreamazz
Copy link
Collaborator

andreamazz commented Apr 24, 2018

Hi @MarcHe124
how are you attaching the tap handler to a spinner with a delay?
Your best course of action would be to do it as it's done in the demo project:

DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
    SwiftSpinner.show("Connecting \nto satellite...").addTapHandler({
    print("tapped")
    SwiftSpinner.hide()
  }, subtitle: "Tap to hide while connecting! This will affect only the current operation.")
})

Since when a spinner is shown the previous tap handler is cleared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants