Multiple value to UIPicker View
I have a UI picker view to store child details, i got the value through a web service.I was added child name to picker view , now it shows all childs.
I also have one more value child id to store in the picker view, when a user select a child i n开发者_开发问答eed to get the id of the corresponding child.How i add multiple values to same row a pickerview.
Thanks, Companion
I got it you want to store its Id too then you have to use an object to handle this
int selectedRow = [childPicker selectedRowInComponent:0];
Child *childObj = [childsList objectAtIndex:selectedRow];
Here in childObject, You have stored this values. childObj.childName; childObj.childId;
You can basically use a pickerView with two components.set the text to picker label based on component
精彩评论