如何使用多个选择器?
我的应用程序收集各种类型的信息并将其发送到我们的服务器。有些问题是固定类型的,所以我需要使用选择器。当我在应用程序以选择数组启动时初始化选择器之前使用过选择器。我原以为我会通过各种子视图使用不同的选择器。只使用一个Picker,然后动态重置使用的数组会不会更好。如果是这样我该怎么做?
My app collects various types of information and sends it off to our server. Some of the questions are of fixed type so I need to use Pickers. When I've used pickers before they are initialised when the app starts with the array of selections. I had thought I would use different pickers through various subViews. Would it be better to use just one Picker and then reset the array used dynamically. If so how do I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请注意,数据源和委托协议的每个方法都包含一个 UIPickerView * 参数,例如:
您需要使用它来区分两个实例,如下所示:
Note that each method of both the datasource and the delegate protocols contain a UIPickerView * parameter, for instance:
You need to use it to distinguish between your two instances, as follows:
给两个不同的标签。并比较用于加载数组的标签。
Give the two different tags. And compare tag for loading your array.