0

我有一个带有 2 个组件的 UIPickerView

两个组件的默认值都选择为初始索引。

如何将第一个组件设置为第二个索引并将第二个组件保留在第 4 个项目上。

- 更新 -

我添加了

[currencyPicker selectRow:1 inComponent:0 animated:YES];

viewDidLoad

现在我的 UIPicker 中的元素不加载

4

1 回答 1

2

您可以告诉它转到特定行,如下所示:

 [myPickerView selectRow:_my_row_ inComponent: _1st_component animated:YES];
于 2012-02-12T18:36:48.013 回答