lexrus / LTMorphingLabel

[EXPERIMENTAL] Graceful morphing effects for UILabel written in Swift.
MIT License
8.07k stars 782 forks source link

How to override the UIButton Label class with LTMorphingLabel in swift? #38

Open VasuLaroiya opened 9 years ago

lexrus commented 9 years ago

I have no idea how to do it in Swift. Maybe with some swizzling in +load method may help.

JamWils commented 8 years ago

I'm not even sure it is necessary to do this. Adding a Tap Gesture to the Label would give it the same functionality as the Button. @VasuLaroiya, can you think of another reason besides the tap functionality for overriding UIButton's Label?

It should be as simple as creating a new subclass of UIButton called LTMorphingButton and overriding the titleLabel property to return the LTMorphingLabel.

VasuLaroiya commented 8 years ago

Hmm thanks for that tip @JamWils I'll try that and report back if it worked