带有pickerview的UItextfield作为firstresponder ios [英] UItextfield with pickerview as firstresponder ios

查看:77
本文介绍了带有pickerview的UItextfield作为firstresponder ios的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个UITextField,在点击时需要显示UIPickerView.而且,在pickerview中选择的数据也将插入到文本字段中.为了实现这一目标,我现在使用subhajit的 SHPickerField .

I had a UITextField which when tapped need to show a UIPickerView. Also the data selected in pickerview will be inserted in the textfield. To Achiceve it I am now using subhajit's SHPickerField.

推荐答案

我确实创建了UITextField的子类,它易于实现和使用.这是GitHub链接:

I do have created a subclass of UITextField, it is easy to implement and use. Here is the GitHub link:

访问 https://github.com/subhajitregor/SHPickerFieldExample

请参阅示例以了解如何使用.自述文件现在也已更新.

Please see the example to see how to use. The Readme file is also updated now.

这篇关于带有pickerview的UItextfield作为firstresponder ios的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆