UIPickerView column Titles

廉价感情. 提交于 2019-12-07 06:40:26

问题


I am looking for a way to add a title to each column (component) of the UIPickerView. In all the examples I've seen there are no titles because in general the columns meaning could be figured out based on its order, content and context... however in my application it would be dangerous to confuse the columns so I need to give them titles.

Regards, Craig


回答1:


The way I'd do this would be to create a parent UIView that holds your UIPickerView & add a series of UILabels for column titles. So you don't do anything magical to the UIPickerView, you just display some labels above it in a way that looks like they're part of the same widget.



来源:https://stackoverflow.com/questions/1975987/uipickerview-column-titles

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