调整UILable里的字体大小以适合UILalbe的大小

UILabel* lable = [[UILabel alloc]initWithFrame:CGRectMake(0, 280, 150, 40)];
lable.text = @"wMAFAFAFEFFFFEA12";
lable.font = [UIFont systemFontOfSize:22];
lable.numberOfLines = 1;
lable.adjustsFontSizeToFitWidth = YES;
lable.minimumFontSize = 1.0f;
[self.view addSubview:lable];

你可能感兴趣的:(UI)