UIPicker font size for a certain column and row

好久不见. 提交于 2019-12-24 00:59:47

问题


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?

thanks for any help.


回答1:


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;

to return a well configured UILabel (you can change font property or set adjustsFontSizeToFitWidth property to YES).



来源:https://stackoverflow.com/questions/6829132/uipicker-font-size-for-a-certain-column-and-row

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!