MMLoadingButton
MMLoadingButton copied to clipboard
Calling stopLoading while startLoading animation is running makes button stuck in loading state
If you call stopLoading on the button before the animation for startLoading is finished, the CAAnimationDelegate's animationDidStop for "ShrinkStart" sets the stateLayer's currentState to ".loading" even though stopLoading set the state to success or error and so the button gets stuck in the loading state.
It's annoying and unideal for the user to have to add delays before stopping the loading.
Any progress on this? just started using this and ran into it almost immediately. Some of my network calls are really quick and it seems to not call the completion handler when this occurs.
If you put a delay (it's a hack) it works.
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
<#CODE HERE#>
}
I'm thinking is send pull request soon with my solution if anyone still need