It is not possible to set new title text
frodestorhaug opened this issue · 2 comments
frodestorhaug commented
I want to set a new title for the button after loading finishes. But the text is reset to cached title.
Would it be a good idea to set the button to invisible instead of "" and revert to a visible button after ?
An example here : https://github.com/frodestorhaug/TransitionButton
btw thanks for a very nice framework 👍
AladinWay commented
Thank you for you feedback, I'm wondering why you don't just update the the title in the completion block of the animation something like:
button.startAnimation() // 2: Then start the animation when the user tap the button
button.stopAnimation(animationStyle: .shake, revertAfterDelay: 1, completion: {
button.setTitle("error", for: .normal)
})
or you don't want to display the previous title at all ?