Monotouch: How can I set selected items in a UIPickerView?

I have successfully created a UIPickerView and am using a custom ListModel tu to deliver selected items. But how can I indicate which of the elements should be selected when the view appears?

Thanks,

Adrian

+8
source share
1 answer

You must call the viewer Select Method:

pickerView.Select(1, 0, true); 

This will select the second row (index 1) of the first component (index 0). Boolean for the animation of the selection or not.

See the documentation .

+18
source share

All Articles