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
Post a Comment