ios - TTTAttributedLabel not displaying the last line when having Emoji symbols -


we using "tttattributedlabel" displaying labels. calculating correct rectangle size, use nsstring's "sizewithfont" method, "constrainedtosize" width of field.
calculation fine, unless there emoji symbols in text, , text multi line (for example: smiley-newline-smiley). in case, returned size small (vertically), , last line not shown. if text not contain emoji (e.g. x-newline-x) - size correct.
our font "helveticaneue" size:16.25, in case makes difference.
there better way calculate needed size, work emoji well?
thanks

i had same situation when making auto-height label according contents of label. seems fine, except when there emojis in label content.

it because did't use correct settext method attributedstring.

[label settext:text afterinheritinglabelattributesandconfiguringwithblock:^      return mutableattributedstring; }]; 

this correct way set attributedstring, did

[label setattributedtext:text]; 

so getting wrong label heights when includes emojis in it.

i solved problem changing set method correct 1 described in github manual.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -