private let dataLabel = UILabel().then {
$0.font = UIFont.kep_digitalBoldSize(18)
$0.textColor = .white
$0.numberOfLines = 1
$0.adjustsFontSizeToFitWidth = true // 设置允许自动缩放
$0.minimumScaleFactor = 0.70 // 缩放比例
}
2021-11-05 iOS 设置 UILabel 内容显示不下时自动缩放字体
最新推荐文章于 2024-05-03 12:06:54 发布