问题
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