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.
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.
how can given string with kerning rendered width of choosing (i.e. grey view's width)?
Comments
Post a Comment