0

I have a UIButton whose title is using dynamic font size. I want to know the button's new width immediately when I change the system font size in Settings app. button.frame.width seems not yet updated in the didChangeNotification handler. How can I/is it possible to know the updated width of the button using the new font size? Thanks!

Context: I have a dialog which covers the whole screen width when rendered. The dialog has two action buttons (accept, cancel). Both button titles are using dynamic font size. When using regular font size, there is enough horizontal space in the dialog, the action buttons should render side by side. When using largest font size, there isn't enough horizontal space in the dialog, the action buttons should stack (meaning each action button takes its own line).

Mapleman
  • 45
  • 1
  • 8

0 Answers0