问题描述
我希望更改 UIPicker 中特定列和行的字体大小.基本上有太多的文本在视图之外运行,我想缩小第二列中的特定行的大小以使其适合?
I'm looking to change the font size of a certain column and row in a UIPicker. Basically there's too much text that runs off the view and I'd like to size just that particular row in the 2nd column down so it fits?
感谢您的帮助.
推荐答案
如果要自定义标签字体大小,请实现调用的委托方法:
If you want to customize label font size, implement delegate method called :
-(UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view;
返回一个配置良好的UILabel
(您可以更改font
属性或将adjustsFontSizeToFitWidth
属性设置为YES
).
to return a well configured UILabel
(you can change font
property or set adjustsFontSizeToFitWidth
property to YES
).
这篇关于特定列和行的 UIPicker 字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!