UIPickerView字体 [英] UIPickerView Font
本文介绍了UIPickerView字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人知道是否可以更改单个UIPickerView项目的字体和/或颜色?
Does anyone know if it is possible to change the font and/or color for individual UIPickerView Items?
推荐答案
有可能的。要做到这一点,你需要实现 pickerView:viewForRow:forComponent:reusingView:
方法在选择器的委托 - 创建 UILabel
并使用您想要的任何属性进行设置。
Yes, it is possible. To do that you need to implement pickerView:viewForRow:forComponent:reusingView:
method in picker's delegate - create UILabel
instance there and setup it with whatever attributes you want.
这篇关于UIPickerView字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文