Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reload data into UIPickerView

i need to refresh the data in the UIPickerView. i'm using

[pickerView reloadAllComponents];

but my problem is that i need to reset the selected row as well, i want the selected row to go back to index 0, at the moment it is staying at the same index as it was before calling the reloadAllComponents function

can anyone help please??

like image 583
Thomas_LEB Avatar asked May 20 '12 00:05

Thomas_LEB


1 Answers

[pickerView selectRow:0 inComponent:0 animated:YES];

should do it

like image 179
rooster117 Avatar answered Nov 06 '22 18:11

rooster117