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

OHAttributedLabel doesn't handle multiple lines with attributed strings #172

Closed
Ziewvater opened this issue Dec 19, 2013 · 1 comment
Closed

Comments

@Ziewvater
Copy link

I'm having issues with setting an OHAttributedLabel's attributed text with an NSAttributedString containing a newline character. The first line of text appears just fine, but any text after the first line is not shown. Switching the label back to a normal UILabel seems to fix this problem. Also, this problem is only occurring for me with an attributed string; setting the text to an NSString with newline characters behaves properly.

It seems like the label isn't resizing properly, because printing out the contents in the debug console shows the full string text, line breaks included. I am using Auto Layout.

@AliSoftware
Copy link
Owner

Duplicate with #3 #42 #46 #151 #160 and all thoses. Increment your label height so that the last line is drawn because contrary to UIKit, CoreText does not draw a line of text if it does not fit completely in height (see CTFrameSetter in issues)

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

2 participants