-
Notifications
You must be signed in to change notification settings - Fork 344
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
'numberOfLines' property is ignored #34
Comments
I know that this property is ignored, but the problem is that would be very painful to handle, considering the way CoreText works. Actually, until now the text framing is done using a CTFrameSetter which does everything needed for the text framing for us. In one call, it returns CTLines positionned right according to word wrapping, the font and size of the glyphs, etc. If we want to handle the The thing is I won't have time neither to develop & code nor to intensively test (as this would require quite some tests for some special use cases I think about !) this manual implementation of the text framing, I don't plan to implement this in a near future myself. But feel free to try to implement it yourself in a fork, test it, and send me a pull request then so I can integrate it. |
I had same problem so, I had add two line to code and it's working fine. lableName.numberOfLines = 0; Thanx :) |
I've fixed it. Thanx to my employer Relonch, Inc. for time in their project. But it still ignores centerVertically if text can't fit label bounds. For example if only 3 lines can fit and my text needs 4 lines 3 lines would be printed. That's right. But text will be clamped to the top of bounding box even if centerVertically is set to YES. I didn't find clever way to fix it. |
Even by setting numberOfLines property to 0, the warning is triggered. |
Current CocoaPods version still emits the warning |
Which is normal because its aim is to warn you that this is still not supported when truncation is used. You can still use @lazarev 's fork, but I still haven't merged his Pull Request in the master / CP version because it is buggy with the |
In UILabel there is a property named
numberOfLine
.If this property set, Label text is automatically truncated if above specified line limit. (blah blah ...)
It'll be more helpful if numberOfLines property also work with OHAttributedLabel-
Can you handle this?
Thanks -
The text was updated successfully, but these errors were encountered: