tobihagemann / THLabel

UILabel subclass, which additionally allows shadow blur, inner shadow, stroke text and fill gradient.
https://tobiha.de
Other
665 stars 111 forks source link

Is it only numberOfLine = 1 #8

Closed yunchiri closed 10 years ago

yunchiri commented 10 years ago

only numberOfLine = 1 defined?

set numberOfLine = 0 doesn't work

tobihagemann commented 10 years ago

I'm afraid that Core Text doesn't allow automatic word wrapping AND truncate tail (just as an example). Is it sufficient in your case to set lineBreakMode to NSLineBreakByWordWrapping?

yunchiri commented 10 years ago

Wow working find but Implicit conversion from ....' enum NSLineBreakMode' to different ...type 'CTLineBreakMode'...

So chang

CTLineBreakMode -> NSLineBreakMode ==> no waring Thank you MuscleRumble!

tobihagemann commented 10 years ago

Ah yes, NSLineBreakMode and CTLineBreakMode basically have the same content. So a cast with CTLineBreakMode lineBreakMode = (CTLineBreakMode)self.lineBreakMode; should be no problem. I'm glad it's working out for you! :)