is it possible to handle two data sources in the UIPickerView?
I have here a segmented control that would control the display of the picker view.
So, for example, when first segment is clicked, the picker will display person’s name. Then, when second segment is clicked, picker will display place’s name.
Thanks
You can check state of segmented control in your UIPickerView delegates (UIPickerViewDelegate and UIPickerViewDataSource) and return necessary values, depending on this state.
And, of course, you can create two objects (conforming to necessary protocols) and just reset delegates on segment state change. But I think this way is generally worse.