AladinWay / TransitionButton

UIButton sublass for loading and transition animation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

It is not possible to set new title text

frodestorhaug opened this issue · comments

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 👍

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 ?

Sorry, I have tested the above code after fixing #18 so I hope that this fix also your issue :) feel free to reopen the issue if you think that it's not fixed in the next release