且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从UIPickerView删除未选择的项目

更新时间:2023-12-04 12:30:40

您无需在其中添加 UIPickerView 。您只需添加文本字段,然后将 UIPickerView 设置为文本字段的输入附件视图。因此,您的选择器将出现在底部,并且可以使用委托方法在文本字段中显示选择器的选定值。

You dont need to add UIPickerView in there. You just add text field and set your UIPickerView as text field's input accessory view. So your picker will appear in the bottom side and you can display the selected values of picker in the text field by using delegate methods.