Re: Adjusting Font Size to fit View Rectangle


Dave
 

Hi,

Those two methods alter the frame size, I want to keep the same Frame Size but reduce the Font Size of the Content until it fit into the Displayable Area. I’m 99% sure there is a method to do it but maybe its iOS only?

All the Best
Dave

On 20 Sep 2018, at 02:02, Alex Zavatone via Groups.Io <zav@...> wrote:

There are two that I am aware of. sizeToFit and sizeThatFits.
On Sep 19, 2018, at 1:29 PM, Dave <dave@...> wrote:

Hi All,

Is there a Cocoa method I can use that will return the best fitting Font Size for a given String and Font?

I seem to remember using a method that does it but can’t seem to find it any more…..

All the Best
Dave




Join cocoa@apple-dev.groups.io to automatically receive all group messages.