UILabel Autoshrink Synchronization

I have 3 UIButtons per line. I am even good at and use UIStackView.

When I am localized; one of three labels exceeded my ratings. So, to compensate; I kicked into Autoshrink.

    buttons = [receivedButton, usedButton, sentButton]

    _ = buttons.map {button in
        button.titleLabel?.adjustsFontSizeToFitWidth = true
        button.titleLabel?.minimumScaleFactor = 0.5
    }

      

Now the problem is that when it is too long it autostarts and the other two don't. Is there anyway for me to have "willAutoShrinkTo:" on the elements so that if anyone shrinks, I can make sure they all resize to the minimum font size.

So I don't end up with "Long in 15pt" "16 pt" "16 pt" which looks awful.

+3


source to share





All Articles