Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Give spacing to adjustsFontSizeToFitWidth

Tags:

swift

swift3

My problem is quite simple. I'm using adjustsFontSizeToFitWidth with a button, and it is working fine, however, the button has a border and there is ugly overlap between the text and the border.

Is it possible to give spacing between button border and text in this manner?

edit: Here is photo of my problem.

photo of problem

also, a solution that doesn't use adjust the font size to fit width at all is fine as long as it provides the same functionality.

like image 832
joshLor Avatar asked Jan 21 '26 03:01

joshLor


1 Answers

Try changing contentEdgeInsets or titleEdgeInsets.

like image 143
saroj raut Avatar answered Jan 24 '26 20:01

saroj raut