Reload data in UIPickerView

I need to update data in a UIPickerView. I use

[pickerView reloadAllComponents]; 

but my problem is that I need to reset the selected row, I want the selected row to return to index 0, at the moment it remains at the same index as before the call to the reloadAllComponents function

can anyone help?

+6
source share
1 answer
 [pickerView selectRow:0 inComponent:0 animated:YES]; 

gotta do it

+9
source

Source: https://habr.com/ru/post/916177/


All Articles