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

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

Open
VasuLaroiya opened this issue Jun 20, 2015 · 3 comments

Comments

@VasuLaroiya
Copy link

No description provided.

@lexrus
Copy link
Owner

lexrus commented Sep 10, 2015

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

@JamWils
Copy link

JamWils commented Feb 26, 2016

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
Copy link
Author

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

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

No branches or pull requests

3 participants