开发者

Text Adjust to Fit in code?

Is there an equivalent of Adjust to Fit for UILabel text created dynamically in Xcode? ie:

UILabel *someLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 20, 35, 18)];                                 开发者_开发知识库  
someLabel.font = [UIFont boldSystemFontOfSize:14];
someLabel.FOO_SIZETOFIT = YES; //FOO CODE
[someLabel release];


add this line

someLabel.adjustsFontSizeToFitWidth = YES;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜