I have a CATextlayer of a certain size and NSAttributedString text of unknown length.
I need to adjust the font-size so the text fits the frame (not vice versa 🙂
Any ideas where to start? 🙂
[Edit] as nall points out, I can determine the string length, of course, it’s some text entered by the user that I need to fit into a box of fixed size.
I ended up doing this:
textlayeris aCATextlayertheStringis aNSMutableAttributedStringAnd yes, it’s not very elegant and could definitely be improved 😉