I am instantiating a UILabel programatically. The label displays numbers in a count down. The problem is I seem unable to increase the font size dispute the fact I have the following code
[self.viewAnimation addSubview:lblCounter];
[lblCounter setAdjustsFontSizeToFitWidth:NO];
[lblCounter setMinimumFontSize:30.0];
[lblCounter setTextAlignment:UITextAlignmentCenter];
The UILabel is plenty big enough to fit size 30 font.
Anyone had similar problems?
使用[lblCounter setFont:[UIFont systemFontOfSize:30]]
,最小字体大小仅在adjustsFontSizeToFitWidth为“是”时适用,并调整字体在裁剪前将缩小多少。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.