刷新/重新加载 uipicker
嗨,
我在视图上添加了 uipicker。我在不同的文本框上显示的视图开始编辑事件。我想在不同的文本框编辑事件上从不同的数据源填充 uipicker。所以我想刷新或重新加载 uipicker 视图上的数据。所以请建议。
Hii,
I add the uipicker on a view. and that view i am showing on the different textbox begin editing event. and i want to fill the uipicker from the different datasources on the different textbox editing event. so i want to refresh or reload the data on uipicker view. so plz suggest.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
每次调用
reloadAllComponents
时,选择器都会向其数据源询问新信息。您还可以通过使用要重新加载的组件的整数索引调用reloadComponent:
来指定单个组件。所有这些都可以在 文档。
The picker will ask it's dataSource for new information every time
reloadAllComponents
is called. You can also specify a single component by callingreloadComponent:
with the integer index of the component you want to reload.All this can be easily found in the documentation.