0

My NSAlert has 2 buttons. I changed the font of a button but its frame doesn't auto-resize to crops its text.
I have tried changing the frame of the button, use sizeToFits, set attribute title, ... but it didn't work.
How can I make the button to crops the text? Is it possible? Thanks.

Here is a screenshot of the button:

button screenshot

I use this code to change the button's font:

alert.buttons[0].font = NSFont.systemFont(ofSize: 25.5)
Parth
  • 2,682
  • 1
  • 20
  • 39
Hoang Anh Tuan
  • 370
  • 3
  • 9

0 Answers0