Using UIButtonConfiguration, what is the equivalent refactor for titleLabel.minimumScaleFactor?

I can't seem to find the proper refactor for scaling down the title by using something like UIButton.titleLabel.minimumScaleFactor. Is there something in a NSAttributedString that I could use? If that's the case, I can probably use the attributedTitle property on UIButton.configuration. Let me know what you think!

Answered by Frameworks Engineer in 753771022

There isn't an equivalent – for accessibility support we recommend instead looking at the titleLineBreakMode for 1-line buttons instead.

Alternatively you can implement this manually with a bit of care with updating the configuration then reading back the sizing that the button lays out in. But again, this breaks users that want to use higher accessibility text sizes.

Accepted Answer

There isn't an equivalent – for accessibility support we recommend instead looking at the titleLineBreakMode for 1-line buttons instead.

Alternatively you can implement this manually with a bit of care with updating the configuration then reading back the sizing that the button lays out in. But again, this breaks users that want to use higher accessibility text sizes.

Using UIButtonConfiguration, what is the equivalent refactor for titleLabel.minimumScaleFactor?
 
 
Q