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

Remove sizeThatFits - should fix most autolayout and sizing errors. #46

Merged
merged 1 commit into from
Mar 11, 2016
Merged

Remove sizeThatFits - should fix most autolayout and sizing errors. #46

merged 1 commit into from
Mar 11, 2016

Conversation

kaandedeoglu
Copy link
Contributor

Although I was the one who originally put the override for sizeThatFits - I've recently realized that it no longer worked correctly due to the recent structural changes in ActiveLabel. Removing the override and relying on UILabel's own implementation seems to fix the issues. #45, #41 and #36 should see improvements with this one.

@MBLESSEN
Copy link

This still does not fix the ui label cutting off text. #45 with custom font.

@kaandedeoglu
Copy link
Contributor Author

@MBLESSEN Autolayout support might also require intrinsicContentSize to be overridden. Can you please try if

let labelHeight = label.sizeThatFits(CGSize(width: CGRectGetWidth(label.frame), height: CGFloat.max)).height

label.frame.size.height = labelHeight

gives the correct height.

@polqf
Copy link
Contributor

polqf commented Mar 11, 2016

Merging this! Sorry for the delay!

polqf added a commit that referenced this pull request Mar 11, 2016
Remove sizeThatFits - should fix most autolayout and sizing errors.
@polqf polqf merged commit 2954215 into optonaut:master Mar 11, 2016
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

Successfully merging this pull request may close these issues.

None yet

3 participants