views:

46

answers:

2

I'm changing components (in particular, the number and color of components), in a UIPickerView that I call pickerOne, so after making the changes, I call:

[pickerOne reloadData];

and it appears to be working perfectly however, I'm getting a compile warning:

warning: 'UIPickerView' may not respond to '-reloadData'

Although this appears to work, is there something else that I should use to reload data?

Thanks

+2  A: 

I think you should be using:

reloadComponent:

or

reloadAllComponents:

Avalanchis
yup, no ugly warning across my code and works just as well. thank you very much
Matt Winters
+2  A: 

You should be calling reloadComponent: or reloadAllComponents:.

There may be a private reloadData used under the covers, but it's not part of the public API, and therefore, shouldn't be relied upon.

MarkPowell
2 identical answers within 3 minutes, I guess I should have known this. Thank you.
Matt Winters