tags:

views:

411

answers:

1

How can I get the current selected row for UIPicker?

I want to use it to get at the associated string. Like this. The problem is I do not know how to get the row.

//need to get currently selected row
 NSString *strPeriodSelection = [arrayRecurChoices objectAtIndex:periodPicker.row???];

Thanks in advance.

A: 

Use [pickerView selectedRowInComponent:0]. Check out this discussion.

luvieere
It could not find that method, not sure why.
jp chance
Updated with link, to assure you that the method really exists.
luvieere
I see now. The method begins with a lower class s. Thank you.
jp chance