Reputation: 33318
I've successfully created a UIPickerView and am using a custom ListModel tu supply the selectable items. But how can I specify which of the items should be selected when the view appears?
Thanks,
Adrian
Upvotes: 8
Views: 3812
Reputation: 8170
You have to call the picker view's Select method:
pickerView.Select(1, 0, true);
This will select the second row (index 1) of the first component (index 0). The boolean is for animating the selection or not.
See the documentation.
Upvotes: 19