为什么UIButton在IB上设置了属性文本而不考虑adjustsFontSizeToFitWidth的任何想法。
button.titleLabel?.numberOfLines = 3
button.titleLabel?.adjustsFontSizeToFitWidth = true
button.titleLabel?.lineBreakMode = .//tried all options here....
button.titleLabel?.minimumScaleFactor = 0.2
答案 0 :(得分:0)
adjustsFontSizeToFitWidth对属性字符串不起作用,您必须自己手动设置适当的字体大小