关于为什么在 IB 上设置了属性文本的 UIButton 不遵守 adjustsFontSizeToFitWidth 的任何想法。
button.titleLabel?.numberOfLines = 3
button.titleLabel?.adjustsFontSizeToFitWidth = true
button.titleLabel?.lineBreakMode = .//tried all options here....
button.titleLabel?.minimumScaleFactor = 0.2
最佳答案
adjustsFontSizeToFitWidth 不适用于属性字符串,您必须自己手动设置适当的字体大小
关于ios - 带有属性文本的 UIButton 不遵守 adjustsFontSizeToFitWidth,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37232855/