cocoa touch - Dynamically sizing text with kerning to occupy the full width of a UILabel -


i have layout uilabel placed above fixed width view, shown below grey rectangle.

text scales without kerning

the text needs match width of fixed grey view.

i achieved setting adjustsfontsizetofitwidth property on uilabel yes, settings font size large, , setting minimumscalefactor suitable small. this worked fine until…

i had add kerning said text. added kerning applying @{nskernattributename: @1.40} attributed string , passed attributed string uilabel’s attributedtext property. unfortunately seems stump automatic scaling, results in text being kerned end of string truncated. though label scaled text down without taking kerning account.

text truncated when kerning added

how can given string with kerning rendered width of choosing (i.e. grey view's width)?


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -