★ wanayoo — archive 1999 https://github.com/TTTAttributedLabel/TTTAttributedLabel/pull/730Nouvelle recherche | Portail wanayoo
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

Fix sizeThatFits: and textInsets #730

Open
wants to merge 5 commits into
base: master
from

Conversation

@gskbyte
Copy link
Contributor

@gskbyte gskbyte commented Nov 17, 2016

Fixes the issue of size not properly computed when textInsets have a value different to UIEdgeInsetsZero, which could provoke the following bug:

screen shot 2016-11-17 at 16 49 12

A test has been added to prove that the fix works. There is also a change to avoid an unnecessary allocation inside sizeThatFits: when the attributedTruncationToken is not set.

Thanks for this great library!

@gskbyte gskbyte changed the title Fix size that fits text insets Fix sizeThatFits: and textInsets Nov 17, 2016
[fullString appendAttributedString:self.attributedTruncationToken];
string = [fullString copy];

This comment has been minimized.

@segiddins

segiddins Nov 17, 2016
Member

why is the copy necessary?

This comment has been minimized.

@gskbyte

gskbyte Nov 18, 2016
Author Contributor

It's actually not necessary, I will remove it in the next commit.

@segiddins
Copy link
Member

@segiddins segiddins commented Nov 17, 2016

This needs to pass on CI

Jose Alcalá Correa
@gskbyte
Copy link
Contributor Author

@gskbyte gskbyte commented Nov 18, 2016 •

The build failed in the CI because of a timeout and I can't retrigger it (the CircleCI API returns permission denied). Could you please retry it?

@gskbyte
Copy link
Contributor Author

@gskbyte gskbyte commented Nov 18, 2016

Hi, it seems that the CI can't find the right scheme in the project file. I tried running it locally and everything is okay. May it be a misconfiguration of the circle.yml file?

Jose Alcalá Correa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.