iOS

1. label 左右约束要给。 

 
2.代码实现
label.adjustsFontSizeToFitWidth = YES

原文地址:https://www.cnblogs.com/qingzZ/p/9299195.html