iOS下拉视图 [英] iOS drop down view

查看:180
本文介绍了iOS下拉视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在搜索当用户点击它或崩溃时基本上展开的下拉视图(展开&折叠视图)。

I have been searching for drop down view (expand & collapse view) that basically expand when user clicked on it or collapse.

下拉菜单基本上用于包含textview / textfield。
到目前为止,我无法设法找到如何创建这个下拉列表视图。
我设法找到的是下拉菜单,这是一个类似于选项的选项,允许您选择一个选项。我只想包括文本。请问有关这方面的指针吗?

The drop down is basically use to include textview/textfield. Till now I could not manage to find how to create this drop down view. What I managed to find is drop down menu which is sort of like an option picker that allows you to select an option. I just wanted to include text only. Is it possible to ask for some pointers regarding this?

谢谢。

推荐答案

我还需要一个HTML选择式控件(单选下拉列表),而不会在过去和将来的iOS版本中打破XCode遗留的GUI界面。

I also needed a HTML select-like control (single-selection dropdown list) without breaking the XCode legacy GUI interface across past and future iOS releases.

我结束了up编码 DownPicker ,这是一个轻量级的控件,它只是结合 UITextField UIPickerView 。它可以作为自定义控件( UIDownPicker )或也可以作为控件包装器使用,升级任何现有的 UITextField

I ended up coding DownPicker, a lightweight control which does just that combining UITextField and UIPickerView. It can be used either as custom control (UIDownPicker) or also as control wrapper, upgrading any existing UITextField.

这是它的样子:

有关更多信息和下载,您可以检查这个简短教程 GitHub项目页面

For more info and download you can check this brief tutorial or the GitHub project page.

这篇关于iOS下拉视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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