Give spacing to customizeFontSizeToFitWidth
My problem is pretty simple. I am using adjustsFontSizeToFitWidth
with a button and it works fine, however the button has a border and there is an ugly match between the text and the border.
Is it possible to set the distance between the border of the button and the text this way?
edit: Here is a photo of my problem.
also, a solution that doesn't use adjust the font size to fit the width, fine as long as it provides the same functionality.
source to share
The two ways you can do this are up to you.
-
Increase the size of your button. Once set
adjustsFontSizeToFitWidth
to true and the title of the button, setadjustsFontSizeToFitWidth
back to false and then resize your button. -
Reduce the size of your button name. By setting the
adjustsFontSizeToFitWidth
title of the button to true, set itadjustsFontSizeToFitWidth
back to false. Now check the font size of your heading and then reduce it.
source to share