iOS 15 UIButton configuration title line break mode not effect?

Viewed 108

In iOS 14 or before, if we want to set titleLabel's attributes, we can simply using

button.titleLabel?.lineBreakMode = .byTruncatingTail

or shrink the title text:

button.titleLabel?.adjustsFontSizeToFitWidth = true
button.titleLabel?.minimumScaleFactor = 0.5

But after updated to iOS 15's newest API UIButton.Configuration, the above codes are not effect, the button is just expand its height, that definitely not the way I want, pls see below:

enter image description here

Is any solution to restore lineBreakMode or minimumScaleFactor as in iOS 14 when using iOS 15 UIButton.Configuration?

0 Answers
Related