label根据文字自动适应大小

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(20, 100, 150, 10)];
[label sizeToFit];