iphone - Word cut off in TTTAttributedLabel -


i using tttattributedlabel when try show link cut word center can see in attached image word "fun" cut off after word "f" , "un" appears on next line. want full word should show on first line or in next line. help.

enter image description here

enter image description here

if ([_label iskindofclass:[tttattributedlabel class]])             {                 tttattributedlabel *tttlabel=(tttattributedlabel *)_label;                                          [tttlabel setdelegate:self];                      [tttlabel setdatadetectortypes:uidatadetectortypelink|uidatadetectortypephonenumber];                     [tttlabel setlinebreakmode:nslinebreakbywordwrapping];                    [tttlabel settext:attributedtext];                 if ([dic objectforkey:@"texttolink"]!=nil)                 {                     [tttlabel addlinktourl:[nsurl urlwithstring:[dic objectforkey:@"hyperlink"]] withrange:[text rangeofstring:[dic objectforkey:@"texttolink"] options:nscaseinsensitivesearch]];                 }                } 

in latest version of tttattributedlabel, default linkattributes property updated have word wrap default. make sure both label , linkattributes have desired line break mode (linebreakmode property label; nsmutableparagraphstyle linebreakmode linkattributes).


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -