Equivalent of dynamic type “automatically adjusts font” setting for UIButton in Interface Builder?
问题 A UILabel has a Dynamic Type: Automatically Adjusts Font check-box in the Attributes Inspector in Interface Builder. Is there an equivalent in Interface Builder for automatically adjusting the font size of a UIButton, or does this have to be handled in code? I'm using Xcode 9.0 beta 6, targeting iOS 11. 回答1: Apparently there isn't, but it's not very hard to fix. You can make an extension on UIButton with an @IBInspectable property: extension UIButton { @IBInspectable var