创建一个下拉列表 [英] Creating a drop down list
问题描述
你将从一个UITextField和一个按钮开始看起来像一个正常的关闭下拉列表。然后当按钮被点击时,我将添加一个包含一个小的UITableView的新视图,用于下拉部分。这不应该太难了。不过我会重新考虑一个下拉框的需要。它只是不是你有屏幕上的空间,而UIPickerView更适合IMHO。现在在iPad上,他们使用了类似于上面描述的下拉菜单,但它在屏幕上有足够的空间使其变得实用。
I want to make a drop-down list from scratch. Can anyone please tell me how to do so?
You would start with a UITextField and a button to look like a normal closed drop down list. Then when the button is clicked I would add a new view containing a small UITableView for the drop down part. It shouldn't be too hard. However I'd reconsider the need for a drop down box. Its just not something that you have room on screen for, and the UIPickerView is better suited IMHO. Now on the iPad they use a drop down similar to what I described above but it has enough room on the screen to make this practical.
这篇关于创建一个下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!