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

Number of lines is ignored #40

Open
peterpaulis opened this issue Oct 29, 2020 · 6 comments
Open

Number of lines is ignored #40

peterpaulis opened this issue Oct 29, 2020 · 6 comments

Comments

@peterpaulis
Copy link

Doesn't support number of lines as the UILabel

@zacwest
Copy link
Owner

zacwest commented Oct 29, 2020

Can you share an example of this not working?

@peterpaulis
Copy link
Author

you can set the number of lines, but the label renders as with numberOfLines = 0

@zacwest
Copy link
Owner

zacwest commented Oct 30, 2020

This class does not do any drawing, so if there's an issue with constraining the sizing it's likely how you are configuring it. Does the issue still reproduce if you replace ZSWTappableLabel with UILabel?

@revolter
Copy link

revolter commented Feb 5, 2021

I think that this is related to the fact that adjustsFontSizeToFitWidth doesn't work either.

@revolter
Copy link

revolter commented Feb 5, 2021

Oh, it works if you set lineBreakMode to NSLineBreakByTruncatingTail, but then the tap detection breaks. So this library doesn't allow you to have a label with both autoshrinking text and tappable links.

@revolter
Copy link

revolter commented Feb 5, 2021

This simple implementation works perfectly.

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

No branches or pull requests

3 participants