ios - How to get text string dimensions if I have CTFontRef? -


i know can use: cgsize r = [mystring sizewithfont:uifont]; problem not have uifont, use core text. have ctfontref. way string size givet ctfontref? have font size in double.

thank you

you can create ctframesetter use ctframesettersuggestframesizewithconstraints measure dimensions of string when rendered text -- using additional context provide.

of course, create function reduces variables font+size there.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -