[英]Multiple component picker view
I am working on project with picker view. 我正在使用选择器视图进行项目。 I have two components in it.
我有两个组成部分。 I want to have the second component contents loaded based the selection made in the first view.
我想基于在第一个视图中所做的选择加载第二个组件的内容。
Your pickerView:numberOfRowsInComponent:
and pickerView:titleForRow:forComponent:
when called for the second component will have to check the value of the first component to determine what to return. 您的
pickerView:numberOfRowsInComponent:
和pickerView:titleForRow:forComponent:
在调用第二个组件时,将必须检查第一个组件的值以确定返回什么。
pickerView:didSelectRow:inComponent:
when called for the first component will have to call reloadComponent:
on the picker to tell it to reload the data for the second component. pickerView:didSelectRow:inComponent:
当第一个组件被调用时, reloadComponent:
在选择器上调用reloadComponent:
以告诉它重新加载第二个组件的数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.