views:

41

answers:

1

Hi,

I have UIPickerView component that receive data from its datasource (NSMutableArray) which is populated from sqlite. When user click on button new data row is added to databse. Now I need to reload UIPickerView to display fresh data from datbase. I know that I need to use method [storedDataPicker reloadAllComponents]; somehow but I don;t know how :( any direction, help please :)

A: 

I had a similar problem. I was loading up an array from a database in viewDidLoad that would populate the components, but I was calling to reload the picker from viewWillAppear meaning that the array that provided the datasource was not reloaded at the same time as the picker and thus not reflecting changed values. Make sure that the original data source is reloading along with the picker.

Mike