In my project, there is a UILabel with text. The font size is 16pt. The text contents are changed depending on different cases. I hope it can automatically adju
UILabel
NSString *txt1=@"I am here."; CGSize stringsize1 = [txt1 sizeWithFont:[UIFont systemFontOfSize:14]]; [label setFrame:CGRectMake(x,y,stringsize1.width,hieght)]; [label setText:txt1];