Synchronizing UILabel Autoshrink

Viewed 217

I have 3 UIButtons in a row. I'm even being good and using a UIStackView.

When I localised; one of the three labels exceeded my bounds. So, to compensate; I kicked in Autoshrink.

    buttons = [receivedButton, usedButton, sentButton]

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

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

This way I don't wind up with "Long in 15pt" "16 pt" "16 pt" which looks horrid.

0 Answers
Related